@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.nav-links a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: #ff6b35;
}

/* Back Button */
.back-btn {
    position: fixed;
    top: 25px;
    left: 50px;
    z-index: 1001;
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: #ff6b35;
}

.back-btn::before {
    content: '← ';
}

/* Container */
.container {
    /* Reduced width so images render at a slightly smaller CSS size and appear crisper */
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 30px 40px;
}

/* Compact Header */
.project-header {
    text-align: center;
    margin-bottom: 50px;
}

.project-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 400;
    color: #888;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.project-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tag {
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.view-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 10px 24px;
    background: transparent;
    color: #ffffff;
    border: 1px solid #333;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    border-color: #ff6b35;
    color: #ff6b35;
    transform: translateY(-2px);
}

.btn.primary {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #000;
}

.btn.primary:hover {
    background: transparent;
    color: #ff6b35;
}

/* Compact Image Preview */
.project-preview {
    margin: 40px 0;
}

.preview-container {
    background: #111;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #222;
    position: relative;
    overflow: hidden;
}

.browser-bar {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    margin: -15px -15px 15px -15px;
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca3f; }

.url-bar {
    flex: 1;
    background: #2a2a2a;
    color: #888;
    padding: 6px 12px;
    border-radius: 6px;
    margin-left: 15px;
    font-size: 13px;
}

.project-image {
    width: 100%;
    /* Use a consistent aspect ratio so images scale predictably and crop cleanly */
    aspect-ratio: 16 / 9;
    /* Slightly lower max-height to better match reduced container width */
    max-height: 520px; /* prevents image from becoming too tall on very wide screens */
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 8px;
    display: block;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* fills the container while preserving aspect and cropping edges */
    display: block;
}

/* Slightly smaller preview on small screens */
@media (max-width: 768px) {
    .project-image {
        aspect-ratio: 16 / 9;
        max-height: 420px;
    }
}

/* Compact Description */
.project-description {
    margin: 40px 0;
    text-align: center;
}

.description-text {
    font-size: 1rem;
    color: #888;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Compact Navigation */
.project-nav {
    margin: 50px 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    border-top: 1px solid #222;
}

.nav-item {
    text-decoration: none;
    color: #888;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-item:hover {
    color: #ff6b35;
}

.nav-item.prev::before {
    content: '← ';
}

.nav-item.next::after {
    content: ' →';
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid #222;
    color: #666;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 100px 20px 40px;
    }

    .nav {
        padding: 15px 20px;
    }
    
    .back-btn {
        left: 20px;
        top: 20px;
    }

    .project-title {
        font-size: 2rem;
    }

    .project-image {
        height: 250px;
    }

    .project-nav {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-links {
        gap: 20px;
        flex-wrap: wrap;
    }
}