@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    color: #1a1a1a;
    line-height: 1.7;
    font-size: 18px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 130px 40px 60px;
}

/* Homepage Hero - matching Adobe Portfolio */
.hero {
    margin-bottom: 80px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.intro {
    margin-bottom: 28px;
}

.intro p {
    font-size: 1.25rem;
    margin-bottom: 6px;
    color: #999;
    font-weight: 400;
    line-height: 1.5;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 20px;
}

.social-links a:hover {
    background: #333;
}

/* Homepage Project List - Full Width Cards with Gap */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 350px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.project-card:nth-child(even) {
    direction: rtl;
}

.project-card:nth-child(even) > * {
    direction: ltr;
}

.project-card-image {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

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

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

.project-card-info {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #f7f7f7;
}

.project-card-title {
    font-size: 1.6rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

/* Project Page Styles */
.project-page {
    max-width: 1200px;
    padding-top: 65px;
}

.project-page .back-link {
    display: inline-block;
    margin-bottom: 40px;
    color: #666;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.project-page .back-link:hover {
    color: #1a1a1a;
}

.project-page h1 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    margin-bottom: 40px;
    font-weight: 600;
    letter-spacing: -0.01em;
    max-width: 100%;
}

/* Video Containers */
.project-video {
    margin-bottom: 50px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 16:9 container for side-by-side videos */
.video-container-16-9 {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
}

.video-container-16-9 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Two column media (video + gif) - Yokoy */
.project-media.two-column {
    display: grid;
    grid-template-columns: 66% 1fr;
    gap: 20px;
    margin-bottom: 50px;
}

.project-media.two-column .video-container {
    padding-bottom: 56.25%;
}

.project-media.two-column .gif-container {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.project-media.two-column .gif-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Two column 4:5 videos (Adidas) */
.project-media.two-column-videos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 50px;
}

.project-media.two-column-videos .video-container {
    padding-bottom: 125%; /* 4:5 aspect ratio */
}

/* Four videos in column */
.project-media.videos-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px;
}

.project-media.videos-column .video-container {
    padding-bottom: 56.25%;
}

/* Project hero image */
.project-hero-image {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 50px;
}

/* Lottie placeholder */
.project-media.lottie-placeholder {
    margin-bottom: 50px;
}

.lottie-container {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 80px 40px;
    text-align: center;
}

.lottie-container p {
    font-size: 1.1rem;
    color: #666;
}

.lottie-container a {
    color: #1a1a1a;
    text-decoration: underline;
}

/* GIF display */
.project-gif {
    margin-bottom: 50px;
}

.project-gif img {
    width: 100%;
    border-radius: 4px;
}

/* Project Meta with Subheadings - Two Thirds Width */
.project-meta-section {
    margin-bottom: 40px;
    max-width: 66%;
}

.project-meta-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.project-meta-section p {
    font-size: 1.15rem;
    color: #444;
    line-height: 1.8;
}

.project-meta-section p a {
    color: #1a1a1a;
    text-decoration: underline;
}

.project-meta-section p + p {
    margin-top: 14px;
}

/* Related Projects */
.related-projects {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.related-projects h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    font-weight: 700;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-card {
    display: block;
    text-decoration: none;
    color: #1a1a1a;
}

.related-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
    transition: opacity 0.2s;
}

.related-card:hover img {
    opacity: 0.85;
}

.related-card span {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 0 40px;
    margin-top: 60px;
    border-top: 1px solid #eee;
}

footer p {
    margin-bottom: 8px;
    color: #666;
    font-size: 1rem;
}

footer a {
    color: #1a1a1a;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .project-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .project-card:nth-child(even) {
        direction: ltr;
    }
    
    .project-card-image {
        aspect-ratio: 16/9;
    }
    
    .project-card-info {
        padding: 30px;
    }
    
    .project-card-title {
        font-size: 1.3rem;
    }
    
    .project-page h1,
    .project-meta-section {
        max-width: 100%;
    }
    
    .project-media.two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 40px 20px 60px;
    }
    
    .intro p {
        font-size: 1.2rem;
    }
    
    .links {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
