/* Button Components */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #9d4edd, #ffd60a);
    color: #000;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ffd60a, #9d4edd);
    transition: left 0.3s ease;
    z-index: -1;
}

.cta-button:hover::before {
    left: 0;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(157, 78, 221, 0.3);
}

.back-button {
    background: rgba(157, 78, 221, 0.1);
    border: 1px solid var(--border-primary);
    color: var(--primary-purple);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition-normal);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-sm);
}

.back-button:hover {
    background: rgba(157, 78, 221, 0.2);
    transform: translateY(-2px);
}

/* Card Components */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.card:hover::before {
    transform: scaleX(1);
}

/* Skill Cards */
.skill-card {
    background: rgba(26, 10, 46, 0.5);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(157, 78, 221, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #9d4edd, #ffd60a);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(157, 78, 221, 0.2);
}

.skill-card h3 {
    color: #ffd60a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skill-card p {
    color: #cccccc;
    line-height: 1.6;
}

/* Project Cards */
.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-primary);
    transition: var(--transition-normal);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none !important;
    z-index: -1;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-header {
    padding: var(--spacing-lg);
    background: var(--gradient-card);
}

.project-card h3 {
    color: var(--primary-gold);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-xl);
}

.project-tech {
    color: var(--primary-purple);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
}

.project-content {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

/* ============================================
   PROJECT CARD BUTTONS - FIXED LAYOUT
   ============================================ */

.project-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Equal width columns */
    gap: 0.75rem;
    margin-top: auto;
    padding-top: var(--spacing-md);
    width: 100%;
}

.project-link {
    padding: 0.75rem 0.5rem; /* Adjust padding */
    background: rgba(0, 245, 255, 0.2);
    color: #00f5ff;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    border: 1px solid rgba(0, 245, 255, 0.3);
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; /* Allow flex shrinking */
}

/* Icon sizing */
.project-link .link-icon {
    font-size: 0.875rem;
    flex-shrink: 0; /* Icons don't shrink */
}

.project-link:hover {
    background: rgba(0, 245, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 245, 255, 0.3);
}

/* Mobile: Stack buttons vertically */
@media (max-width: 768px) {
    .project-links {
        grid-template-columns: 1fr; /* Stack on mobile */
        gap: 0.5rem;
    }

    .project-link {
        width: 100%;
        padding: 0.875rem 1rem;
    }
}

/* Tablet: 2 columns, Details full width */
@media (min-width: 769px) and (max-width: 1024px) {
    .project-links {
        grid-template-columns: 1fr 1fr;
    }

    .details-btn {
        grid-column: 1 / -1; /* Span both columns */
    }
}

/* Blog Cards */
.blog-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-primary);
    transition: var(--transition-normal);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-header {
    padding: var(--spacing-md);
    background: var(--gradient-card);
}

.blog-date {
    color: var(--primary-purple);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-xs);
}

.blog-card h3 {
    color: var(--primary-gold);
    margin-bottom: var(--spacing-sm);
}

.blog-excerpt {
    color: var(--text-secondary);
    padding: 0 var(--spacing-md) var(--spacing-md);
}

.blog-link {
    display: inline-block;
    color: var(--primary-gold);
    text-decoration: none;
    margin: 0 var(--spacing-md) var(--spacing-md);
    font-weight: bold;
    transition: color var(--transition-normal);
}

.blog-link:hover {
    color: var(--primary-purple);
}

/* Service Cards */
.service-card {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
    transition: var(--transition-normal);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: var(--font-size-5xl);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-gold);
}

.service-card h3 {
    color: var(--primary-gold);
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Form Components */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    color: var(--primary-gold);
    margin-bottom: var(--spacing-xs);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(255, 214, 10, 0.2);
}

.form-submit {
    width: 100%;
    padding: var(--spacing-sm);
    background: var(--gradient-primary);
    color: var(--primary-dark);
    border: none;
    border-radius: var(--radius-2xl);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-normal);
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Stats Components */
.stat-item {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
}

.stat-number {
    font-size: var(--font-size-5xl);
    font-weight: bold;
    color: var(--primary-gold);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    color: var(--primary-purple);
    font-size: var(--font-size-lg);
}


/* ============================================
   SUPABASE INTEGRATION STYLES
   ============================================ */

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Content Messages */
.no-projects-message,
.no-blog-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(26, 10, 46, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.no-projects-message h3,
.no-blog-message h3 {
    color: #ffd60a;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-projects-message p,
.no-blog-message p {
    color: #cccccc;
    font-size: 1.1rem;
}

/* Error Messages */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid rgba(255, 0, 110, 0.3);
    border-radius: 15px;
    color: #ff006e;
}

.error-message h3 {
    color: #ff006e;
    margin-bottom: 1rem;
}

.error-message .cta-button {
    margin-top: 1rem;
    background: linear-gradient(45deg, #ff006e, #9d4edd);
}

/* Notification Toast */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: rgba(157, 78, 221, 0.95);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

.notification-success {
    background: rgba(0, 255, 65, 0.95);
    color: #000;
}

.notification-error {
    background: rgba(255, 0, 110, 0.95);
}

.notification-info {
    background: rgba(0, 245, 255, 0.95);
    color: #000;
}

.notification-warning {
    background: rgba(255, 214, 10, 0.95);
    color: #000;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Project Inline Stats */
.project-stats-inline {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: #999;
}

.project-stats-inline .stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Blog Footer */
.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(157, 78, 221, 0.2);
    font-size: 0.85rem;
    color: #999;
}

.blog-reading-time,
.blog-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Form Error States */
.form-group input.error,
.form-group textarea.error {
    border-color: #ff006e;
    box-shadow: 0 0 0 2px rgba(255, 0, 110, 0.2);
}

.error-message {
    color: #ff006e;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Status Messages */
.status-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.status-message.success {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid #00ff41;
    color: #00ff41;
}

.status-message.error {
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid #ff006e;
    color: #ff006e;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Newsletter Message */
.newsletter-message {
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.newsletter-message.success {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    color: #00ff41;
}

.newsletter-message.error {
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid rgba(255, 0, 110, 0.3);
    color: #ff006e;
}

.newsletter-message.info {
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: #00f5ff;
}

/* Blog Tags in Cards */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.blog-tag {
    background: rgba(157, 78, 221, 0.2);
    color: #9d4edd;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid rgba(157, 78, 221, 0.3);
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    .notification {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .project-stats-inline {
        flex-direction: column;
        gap: 0.5rem;
    }

    .blog-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ============================================
   CRITICAL FIX: Force Blog & Project Cards Visibility
   Override any conflicting animations/transforms
   MUST be at END of file for highest specificity
   ============================================ */

/* Grid containers must be visible and CENTERED */
.blog-grid,
#allProjectsGrid,
.projects-grid,
#featuredProjectsGrid,
#latestBlogGrid,
.featured-projects-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    justify-content: center !important;    /* CENTER TRACKS */
    justify-items: center !important;      /* CENTER ITEMS */
    gap: 2rem !important;
    margin: 2rem auto !important;          /* CENTER CONTAINER */
    width: 100% !important;
    max-width: 1400px !important;          /* Constrain on wide screens */
    opacity: 1 !important;
    visibility: visible !important;
    box-sizing: border-box !important;
}

/* Individual cards must be visible and centered */
.blog-card,
.project-card,
.featured-project-card {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: relative !important;
    width: 100% !important;              /* Fill grid cell */
    max-width: 100% !important;          /* Don't exceed cell */
    margin: 0 !important;                /* No margins */
    justify-self: center !important;     /* Center in cell */
    min-height: 200px !important;
    background: rgba(26, 10, 46, 0.8) !important;
    border: 1px solid rgba(157, 78, 221, 0.3) !important;
    border-radius: 15px !important;
    padding: 1.5rem !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* Hover effects */
.blog-card:hover,
.project-card:hover,
.featured-project-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(157, 78, 221, 0.3) !important;
}

/* Ensure card content is visible */
.blog-card *,
.project-card *,
.featured-project-card * {
    opacity: 1 !important;
    visibility: visible !important;
}

/* No featured projects message */
.no-featured-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background: rgba(26, 10, 46, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(157, 78, 221, 0.3);
    color: #cccccc;
    font-size: 1.1rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .blog-grid,
    #allProjectsGrid,
    #featuredProjectsGrid,
    #latestBlogGrid,
    .featured-projects-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* ============================================
   PROJECT DETAILS MODAL
   ============================================ */

.project-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem;
    padding-left: 3rem;
    animation: fadeIn 0.3s ease;
}

/* Center modal on mobile and tablet */
@media (max-width: 1024px) {
    .project-modal-overlay {
        justify-content: center;
        padding-left: 1rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.project-modal {
    background: rgba(26, 10, 46, 0.95);
    border: 1px solid rgba(157, 78, 221, 0.5);
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 0, 110, 0.2);
    border: 1px solid #ff006e;
    color: #ff006e;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: #ff006e;
    color: white;
    transform: rotate(90deg);
}

.modal-header h2 {
    color: #ffd60a;
    margin-bottom: 1rem;
    font-size: 2rem;
    padding-right: 3rem;
}

.modal-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.modal-badges .status-badge,
.modal-badges .featured-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-badges .status-badge.completed {
    background: rgba(0, 255, 65, 0.2);
    border: 1px solid #00ff41;
    color: #00ff41;
}

.modal-badges .status-badge.in-progress {
    background: rgba(255, 214, 10, 0.2);
    border: 1px solid #ffd60a;
    color: #ffd60a;
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-section h3 {
    color: #9d4edd;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-section p {
    color: #cccccc;
    line-height: 1.6;
    font-size: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: rgba(157, 78, 221, 0.2);
    color: #9d4edd;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(157, 78, 221, 0.3);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(157, 78, 221, 0.3);
    transform: translateY(-2px);
}

.project-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-info-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(157, 78, 221, 0.2);
    color: #cccccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-info-list li:last-child {
    border-bottom: none;
}

.project-info-list li strong {
    color: #9d4edd;
    margin-right: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.modal-link {
    flex: 1;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.github-link {
    background: linear-gradient(45deg, #9d4edd, #7b2cbf);
    color: white;
    border: 1px solid rgba(157, 78, 221, 0.5);
}

.demo-link {
    background: linear-gradient(45deg, #ffd60a, #ff006e);
    color: white;
    border: 1px solid rgba(255, 214, 10, 0.5);
}

.modal-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(157, 78, 221, 0.3);
}

.github-link:hover {
    box-shadow: 0 10px 20px rgba(157, 78, 221, 0.5);
}

.demo-link:hover {
    box-shadow: 0 10px 20px rgba(255, 214, 10, 0.5);
}

/* Custom scrollbar for modal */
.project-modal::-webkit-scrollbar {
    width: 8px;
}

.project-modal::-webkit-scrollbar-track {
    background: rgba(157, 78, 221, 0.1);
    border-radius: 10px;
}

.project-modal::-webkit-scrollbar-thumb {
    background: rgba(157, 78, 221, 0.5);
    border-radius: 10px;
}

.project-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(157, 78, 221, 0.7);
}

/* ============================================
   LOADING SKELETON STYLES
   ============================================ */

.loading-state {
    opacity: 0.7;
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(157, 78, 221, 0.1) 0%,
        rgba(157, 78, 221, 0.2) 50%,
        rgba(157, 78, 221, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-header {
    height: 40px;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-image {
    height: 300px;
    width: 100%;
    margin-bottom: 1.5rem;
}

.skeleton-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.skeleton-badge {
    height: 28px;
    width: 80px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 0.8rem;
}

.skeleton-text.short {
    width: 40%;
}

.skeleton-text.medium {
    width: 60%;
}

.skeleton-text.long {
    width: 90%;
}

.skeleton-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.skeleton-tech-tag {
    height: 32px;
    width: 70px;
}

.skeleton-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.skeleton-button {
    height: 48px;
    width: 140px;
}

/* ============================================
   PROJECT NAVIGATION BUTTONS
   ============================================ */

.modal-nav {
    display: flex;
    gap: 0.5rem;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10001;
}

.modal-nav.nav-left {
    left: 1rem;
}

.modal-nav.nav-right {
    right: 1rem;
}

.modal-nav-btn {
    background: rgba(157, 78, 221, 0.3);
    border: 1px solid rgba(157, 78, 221, 0.6);
    color: #9d4edd;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.modal-nav-btn:hover:not(:disabled) {
    background: rgba(157, 78, 221, 0.6);
    border-color: #9d4edd;
    color: white;
    transform: scale(1.1);
}

.modal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.modal-nav-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Show navigation counter on desktop */
.modal-nav-counter {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 10, 46, 0.9);
    border: 1px solid rgba(157, 78, 221, 0.5);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: #9d4edd;
    font-size: 0.9rem;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

/* Mobile responsive navigation */
@media (max-width: 1024px) {
    .modal-nav {
        position: static;
        transform: none;
        justify-content: space-between;
        margin-top: 1.5rem;
        padding: 0 1rem;
    }

    .modal-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .modal-nav-counter {
        position: static;
        transform: none;
        display: inline-block;
        margin: 1rem auto;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .modal-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* ============================================
   IMAGE GALLERY
   ============================================ */

.modal-gallery {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.gallery-images {
    display: flex;
    transition: transform 0.4s ease;
    height: 100%;
}

.gallery-image {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.1) 0%, rgba(255, 214, 10, 0.1) 100%);
}

.placeholder-content {
    text-align: center;
    color: rgba(157, 78, 221, 0.6);
}

.placeholder-content svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(157, 78, 221, 0.5);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.gallery-arrow:hover {
    background: rgba(157, 78, 221, 0.8);
    border-color: #9d4edd;
    transform: translateY(-50%) scale(1.1);
}

.gallery-arrow.prev {
    left: 1rem;
}

.gallery-arrow.next {
    right: 1rem;
}

.gallery-arrow svg {
    width: 20px;
    height: 20px;
    stroke-width: 3;
}

.gallery-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background: #9d4edd;
    border-color: #9d4edd;
    transform: scale(1.3);
}

.gallery-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.7);
}

.gallery-counter {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    z-index: 10;
    backdrop-filter: blur(5px);
}

/* Mobile responsive gallery */
@media (max-width: 768px) {
    .gallery-main {
        height: 250px;
    }

    .gallery-arrow {
        width: 35px;
        height: 35px;
    }

    .gallery-arrow svg {
        width: 16px;
        height: 16px;
    }

    .gallery-arrow.prev {
        left: 0.5rem;
    }

    .gallery-arrow.next {
        right: 0.5rem;
    }

    .placeholder-content svg {
        width: 60px;
        height: 60px;
    }
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .project-modal {
        padding: 1.5rem;
        max-height: 95vh;
        border-radius: 15px;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-link {
        width: 100%;
    }

    .tech-tags {
        gap: 0.4rem;
    }

    .tech-tag {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ============================================
   CRITICAL FIX: Enable Clicks on Project Card Links
   Pseudo-element was blocking all child link clicks
   ============================================ */

/* Ensure ::before/::after don't block clicks */
.project-card::before,
.project-card::after {
    pointer-events: none !important;
    z-index: -1 !important;
}

/* Allow clicks on cards and all children */
.project-card,
.project-card *,
.project-content,
.project-content *,
.project-header,
.project-header * {
    pointer-events: auto !important;
}

/* Ensure links are ALWAYS clickable */
.project-links,
.project-links a,
.project-links button,
.project-link,
a.project-link,
button.project-link,
button.details-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Ensure proper stacking context */
.project-links {
    position: relative !important;
    z-index: 5 !important;
}

/* Visual feedback on hover */
.project-link:hover {
    opacity: 0.9 !important;
}

.project-link:active {
    transform: scale(0.98) !important;
}

