/* Navigation Styles */
.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--brand-accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--brand-accent);
    transition: width 0.2s ease;
}

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

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 2.5rem;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }

    .nav-link {
        font-size: 0.95rem;
    }
}

/* Website Portfolio Section */
.website-portfolio-section {
    padding: 6rem 0;
    background-color: var(--bg-color); /* Ensure contrast if needed */
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

/* Project Card */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;

    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--text-secondary);
}

.card-image-container {
    height: 220px;
    overflow: hidden;
    background-color: #222;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-accent);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.card-actions {
    margin-top: auto;
}

.btn-details {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: var(--brand-accent);
    color: #fff;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-details:hover {
    background-color: #2563eb; /* Darker blue */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Contact Section Placeholder */
.contact-section {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.contact-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-link {
    color: var(--brand-accent);
    font-weight: 500;
}

/* =========================================
   DETAILS PAGE STYLES
   ========================================= */

.project-details-page {
    padding-bottom: 4rem;
}

.details-header {
    margin-bottom: 3rem;
}

.details-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.details-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

@media (max-width: 1024px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

/* Preview Section */
.preview-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    background: var(--bg-card);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: fit-content;
    margin: 0 auto;
}

.device-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.device-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.device-btn.active {
    background: var(--brand-accent);
    color: #fff;
}

.iframe-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: max-width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.iframe-container.mobile {
    max-width: 375px;
}

.iframe-container.tablet {
    max-width: 768px;
}

.iframe-container.desktop {
    max-width: 100%;
}

.project-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff; /* Default iframe bg */
}

/* Info Section */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.info-block h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
}

.feature-checkbox {
    margin-top: 0.25rem;
    accent-color: var(--brand-accent);
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.links-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-link {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--brand-accent);
    color: #fff;
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

/* Loading Spinner */
.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: var(--brand-accent);
    animation: spin 1s ease-in-out infinite;
}

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

.hidden {
    display: none !important;
}

/* Testimonials */
.testimonial-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--brand-accent);
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.testimonial-author {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
