/* ==========================
   GLOBAL
========================== */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #0e1411;
    color: #e6f2eb;
    line-height: 1.6;
    font-size: 16px;
}

a, .store-btn img, .brand img {
    transition: all 0.3s ease;
}

/* ==========================
   LAYOUT
========================== */
#wrap {
    display: flex;
    flex-direction: row; /* sidebar always left */
    max-width: 1100px;
    margin: 40px auto;
    background: #141a16;
    border: 1px solid #2d3a33;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.4);
}

/* ==========================
   SIDEBAR
========================== */
#sidebar {
    flex: 0 0 200px;
    min-width: 200px;
    padding: 20px;
    background: #26603e;
    border-right: 1px solid #2d3a33;
    position: sticky;
    top: 20px;
}

.brand {
    display: block;
    margin-bottom: 25px;
}

.brand a {
    display: block;
}

.brand img {
    width: 120px;
    height: auto;
    display: block;
    opacity: 0.95;
}

.brand img:hover {
    opacity: 1;
    transform: scale(1.03);
}

.sidebar-section {
    margin-top: 30px;
}

.sidebar-section h2 {
    font-size: 16px;
    color: #d0e519;
    background: rgba(34, 211, 93, 0.16);
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section li {
    margin-bottom: 6px;
}

.sidebar-section a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: #d7efe2;
    text-decoration: none;
    font-size: 14px;
}

.sidebar-section a:hover {
    background: rgba(255,255,255,0.08);
    color: #4cd97b;
    transform: translateX(4px);
}

.sidebar-section a.active {
    background: #4cd97b;
    color: #0e1411;
    font-weight: bold;
}

.sidebar-section .store-buttons {
    display: flex;
    flex-direction: column;
    gap: 0px;
    margin-top: 0px;
    width: 140px;
}

.sidebar-section .store-btn {
    display: block;
    width: 100%;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
}

.sidebar-section .store-btn img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.95;
    margin: 0;
}

.sidebar-section .store-btn:hover img {
    transform: scale(1.03);
}

.project-links .store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    min-width: 160px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
}

.project-links .store-btn img {
    height: 42px;
    width: auto;
}

    .sidebar-section .appstore-btn img {
        padding: 10px;
        box-sizing: border-box;
    }

#content {
    padding: 35px;
}

#content h1 {
    margin-top: 0;
    font-size: 32px;
    color: #a4c736;
}

#content h2 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 10px;
    color: #fac800;
}

#content h3 {
    font-size: 18px;
    margin-top: 0px;
    margin-bottom: 0px;
    color: #fac800;
}

#content p {
    font-size: 15px;
    color: #a8c0b3;
}

.blog-section {
    margin-top: 30px;
}

.blog-section h2 {
    font-size: 20px;
    margin-bottom: 14px;
    color: #fac800;
}

.blog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-list li {
    margin-bottom: 18px;
}

.blog-list a {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border-radius: 4px;
    color: #eef8ee;
    text-decoration: none;
    background: rgba(255,255,255,0.08);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    font-size: 16px;
}

.blog-list a::after {
    content: '→';
    margin-left: 12px;
    opacity: 0.8;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.blog-list a:hover,
.blog-list a:focus {
    color: #0e1411;
    background: #d7fde3;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.20);
    transform: translateX(2px);
    text-decoration: none;
}

.blog-list a:hover::after,
.blog-list a:focus::after {
    transform: translateX(3px);
}

.blog-meta {
    font-size: 13px;
    color: #8aa79b;
    margin-top: 6px;
}

#content ul {
    padding-left: 20px;
}

#content li {
    margin-bottom: 8px;
}

/* FEATURED PROJECT CARD */
.featured-project {
    background: #1f2a23;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #2d3a33;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 20px;
}

.featured-project:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
}

.project-card {
    background: #1f2a23;
    border: 1px solid #2d3a33;
    border-radius: 4px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.project-card.project-secondary {
    background: #18221d;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.project-tag {
    background: rgba(76, 217, 123, 0.14);
    color: #fac800;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 16px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.project-hero {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 18px;
    width: 100%;
    height: 250px;
    background: #111916;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Hero frame is 8:3 — export/crop assets to 8:3 (e.g. 1920×720) to fill without side letterboxing; scale-down fits full image. */
.project-hero.electronics {
    height: auto;
    min-height: 0;
    aspect-ratio: 8 / 3;
    overflow: hidden;
    position: relative;
    background: #111916;
}

.project-hero.electronics img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    object-position: center;
}

.project-card.project-quake3 .project-hero img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
}

.project-copy p,
.project-copy ul {
    margin: 0 0 16px;
}

.project-copy ul {
    padding-left: 20px;
}

.project-copy li {
    margin-bottom: 10px;
}

.project-screenshots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
    justify-items: center;
}

.project-screenshots img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 900px) {
    .project-screenshots {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .project-grid {
        gap: 18px;
    }
}

/* ==========================
   FOOTER
========================== */
#footer {
    text-align: center;
    padding: 20px;
    color: #6f8f7f;
    font-size: 13px;
    margin-top: 30px;
}

/* ==========================
   RESPONSIVE
========================== */
@media (max-width: 768px) {
    #wrap {
        flex-direction: column; /* only now moves sidebar on top if screen is narrow */
        margin: 20px;
    }
    #sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #2d3a33;
    }
    #content {
        padding: 20px;
    }
    .store-btn img {
        width: 120px;
    }

    /* Apple */
    .appstore-btn img {
    height: 45px; /* tweak this value */
    width: auto;
    }

    /* Google */
    .googleplay-btn img {
    height: 80px; /* tweak this separately */
    width: auto;
    }	

}