/* Project Case Study Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --secondary-color: #50C878;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border-color: #E1E8ED;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
}

/* Navigation */
.project-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 1rem 2rem;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.back-button:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.project-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%),
                url('../assets/photos/fullsquish/fullsquishimage.png');
    background-size: cover, contain;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    color: white;
    text-align: center;
    padding: 6rem 2rem 2rem;
}

/* Project-specific hero backgrounds */
body:has([href*="alpha-vidiris"]) .project-hero,
.alpha-vidiris-hero {
    background-image: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%),
                      url('AV_assets/chimera_games.png');
    background-size: cover, contain;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

.sonos-cooler-hero {
    background-image: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%),
                      url('sc_assets/sonos.png');
    background-size: cover, contain;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

.bike-fit-hero {
    background-image: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%),
                      url('bikegeo.png');
    background-size: cover, contain;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

.hero-content {
    max-width: 900px;
}

.project-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.project-hero .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.project-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Content Section */
.project-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.content-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.content-section p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.content-section ul {
    color: var(--text-light);
    line-height: 1.8;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-section li {
    margin-bottom: 0.5rem;
}

/* Highlight Box */
.highlight-box {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    margin: 2rem 0;
}

.highlight-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-caption {
    padding: 1rem;
    background: var(--bg-light);
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Video Gallery Items */
.video-gallery-item {
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.video-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.video-gallery-item::after {
    content: '▶';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.video-gallery-item:hover::after {
    opacity: 0.8;
}

/* Prototype Thumbnail Gallery */
.prototype-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 200px));
    gap: 1.5rem;
    margin: 2rem 0;
    justify-content: center;
}

.prototype-thumbnail {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.prototype-thumbnail:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2), 0 6px 12px rgba(0, 0, 0, 0.15);
}

.prototype-thumbnail img,
.prototype-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1;
    display: block;
}

.prototype-thumbnail::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.prototype-thumbnail:hover::after {
    opacity: 0.9;
}

/* Image Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.modal-close:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.tech-tag {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Call to Action */
.project-cta {
    background: var(--bg-light);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 12px;
    margin: 4rem 0;
}

.project-cta h2 {
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* App Links Container */
.app-links-container {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin: 2rem 0;
    align-items: center;
    flex-wrap: wrap;
}

.app-store-link {
    display: inline-block;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.app-store-link:hover {
    transform: translateY(-2px);
}

.app-store-badge {
    height: 48px;
    width: auto;
}

/* iOS-style Link Preview */
.ios-link-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s ease;
    height: 48px;
    flex-shrink: 0;
}

.ios-link-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.link-preview-image {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.link-preview-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-preview-image svg {
    width: 24px;
    height: 24px;
}

.link-preview-content {
    flex: 1;
    min-width: 0;
}

.link-preview-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.link-preview-url {
    font-size: 0.75rem;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

/* Footer */
.project-footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.project-footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .project-hero h1 {
        font-size: 2.5rem;
    }
    
    .project-hero .subtitle {
        font-size: 1.1rem;
    }
    
    .project-meta {
        gap: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .prototype-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .modal-close {
        right: 20px;
        font-size: 40px;
    }
    
    .app-links-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ios-link-preview {
        width: 100%;
    }
    
    .app-store-link {
        align-self: flex-start;
    }
}
