/* Work Page - Portfolio Grid */
.work-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 80px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
    margin-bottom: 80px;
}

.project-preview {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.project-preview:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.preview-media {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 16 / 10;
}

.preview-media a {
    display: block;
    width: 100%;
    height: 100%;
}

.video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-preview:hover .video-preview {
    transform: scale(1.05);
}

.project-content {
    padding: 32px;
}

.project-preview h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 0 0 16px 0;
    letter-spacing: -0.01em;
}

.project-preview h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-preview h3 a:hover {
    color: #fdad01;
}

.project-preview p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    line-clamp: 4;
    overflow: hidden;
}

.post-meta {
    font-size: 0.8125rem;
    color: #999;
    display: block;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

/* Work Detail Pages - Mobile-First Design */

/* Container */
.work-container {
    background: #fff;
}

/* Back Navigation */
.back-to-work {
    display: inline-block;
    margin: 32px 0 24px 0;
    color: #fdad01;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1;
    transition: color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.back-to-work:before {
    content: "← ";
}

.back-to-work:hover {
    color: #333;
}

/* Work Detail Container */
.work-container h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    color: #333;
    margin: 0 0 40px 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
}

.work-intro {
    max-width: 800px;
    margin: 0 auto 80px;
    padding: 0 24px;
}

.work-intro p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 24px;
    text-align: left;
}

.work-intro p:last-child {
    margin-bottom: 0;
}

/* Work Sections */
.work-sections {
    max-width: 1000px;
    margin: 0 auto 80px;
    padding: 0 24px;
}

.work-section {
    margin-bottom: 80px;
}

.work-section:last-child {
    margin-bottom: 0;
}

.work-section h2 {
    font-size: 1.875rem;
    color: #333;
    margin: 0 0 32px 0;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: center;
}

.work-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 24px;
}

.work-section strong {
    color: #333;
    font-weight: 700;
    display: block;
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 1.0625rem;
}

.work-section ul {
    margin: 0 0 32px 0;
    padding-left: 24px;
}

.work-section li {
    font-size: 1rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 12px;
}

/* Video Styling - Distinct from Photos */
.video-wrapper,
.video-section .video-wrapper {
    position: relative;
    width: 100%;
    margin: 40px 0;
    background: #000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* Vertical Video */
.video-wrapper-vertical {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto;
    background: #000;
    max-width: 600px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video-wrapper-vertical video {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

/* Photo Grid - Clean, Borderless */
.screenshot {
    margin: 48px 0;
    padding: 0;
    background: transparent;
    border: none;
    text-align: center;
}

.screenshot-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.screenshot-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.screenshot a {
    display: block;
    line-height: 0;
}

.screenshot img,
.screenshot-row img,
.screenshot-column img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.screenshot a:hover img {
    opacity: 0.9;
}

/* Outro Section */
.work-outro {
    margin: 64px 0;
    padding: 40px;
    background: #f9f9f9;
    border-left: 4px solid #fdad01;
}

.work-outro p {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #555;
    margin: 0;
}

.work-outro a {
    color: #fdad01;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.work-outro a:hover {
    color: #333;
}

/* Twitter Embed */
.twitter-tweet {
    margin: 48px auto !important;
}

/* External Link Buttons */
.work-section .learn-more-btn {
    display: inline-block;
    margin: 32px 0;
}

/* Media Queries for Work */
@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .work-container {
        padding: 0 24px 64px;
    }

    .projects-grid {
        gap: 32px;
    }

    .project-content {
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .work-container {
        padding: 0 16px 48px;
    }

    .project-preview h3 {
        font-size: 1.25rem;
    }

    .video-column {
        flex: 100%;
        max-width: 100%;
        padding: 0 4px;
    }

    .screenshot-column {
        flex: 100%;
        max-width: 100%;
        padding: 0 4px;
    }

    .screenshot-column2 {
        flex: 50%;
        max-width: 50%;
        padding: 0 4px;
    }

    .screenshot img {
        max-width: 100%;
        height: auto;
        margin-top: 10px;
    }
}