:root {
    --bg-main: #060913;
    --bg-card: rgba(15, 23, 42, 0.78);
    --navy-accent: #1e3a8a;
    --blue-highlight: #3b82f6;
    --cyan-glow: #38bdf8;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-subtle: rgba(56, 189, 248, 0.16);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    padding: 2.5rem 1.25rem;
    position: relative;
    overflow-x: hidden;
}

.background-glow {
    position: fixed;
    top: -15%;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 720px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.35) 0%, rgba(6, 9, 19, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.header-card,
.project-card,
.footer-note {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.header-card {
    text-align: center;
    padding: 2.25rem 2rem;
    position: relative;
    overflow: hidden;
}

.header-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--blue-highlight), var(--cyan-glow), transparent);
}

.badge {
    display: inline-block;
    background: rgba(30, 58, 138, 0.5);
    color: var(--cyan-glow);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.3rem 1.1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

h1 {
    font-size: 2.15rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 30%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
    font-size: 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.4);
}

.image-box {
    width: 100%;
    height: 205px;
    background: rgba(10, 15, 30, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-fallback {
    display: none;
    width: 100%;
    height: 100%;
    padding: 1rem;
    text-align: center;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    direction: ltr;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 58, 138, 0.3));
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-body h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.result-line {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.footer-note {
    padding: 1.25rem 1.75rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.footer-note a {
    color: var(--cyan-glow);
    text-decoration: none;
    font-weight: 700;
    direction: ltr;
}

.footer-note a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    body {
        padding: 1.5rem 0.9rem;
    }
    h1 {
        font-size: 1.75rem;
    }
    .header-card {
        padding: 1.6rem 1.2rem;
    }
}

