:root {
    --bg: #0b1220;
    --bg-soft: #111c30;
    --card: #16223a;
    --card-hover: #1c2c48;
    --border: #243352;
    --text: #e8edf6;
    --muted: #9aa9c4;
    --accent: #2f7fff;
    --accent-2: #00c2a8;
    --brand: #004080;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 18, 32, .82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: .5px; color: var(--text); }
.logo span { color: var(--accent); }
.nav a { color: var(--muted); margin-left: 28px; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 96px 0 72px;
    text-align: center;
    background:
        radial-gradient(900px 400px at 50% -10%, rgba(47, 127, 255, .25), transparent 60%),
        radial-gradient(700px 350px at 90% 10%, rgba(0, 194, 168, .18), transparent 60%);
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.1; margin: 0 0 18px; font-weight: 800;
    background: linear-gradient(180deg, #fff, #b9c6e3);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 680px; margin: 0 auto 28px; }
.hero .cta { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: .95rem;
    border: 1px solid transparent; cursor: pointer; transition: .18s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1f6dee; text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg-soft); text-decoration: none; }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-title { font-size: 1.8rem; font-weight: 800; margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 32px; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter {
    padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--bg-soft); color: var(--muted); font-weight: 600; cursor: pointer;
    font-size: .9rem; transition: .15s;
}
.filter:hover { color: var(--text); }
.filter.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Cards grid ---------- */
.grid {
    display: grid; gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column; transition: .2s; box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-4px); background: var(--card-hover); border-color: #31466f; }
.card-media {
    height: 160px; background: linear-gradient(135deg, var(--brand), #0a2a52);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: rgba(255, 255, 255, .85);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-cat { font-size: .78rem; font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: .6px; }
.card h3 { margin: 0; font-size: 1.18rem; }
.card .subtitle { color: var(--muted); font-size: .9rem; margin: -4px 0 0; }
.card p.desc { color: #c4cfe5; font-size: .94rem; margin: 0; flex: 1; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .74rem; padding: 3px 10px; border-radius: 6px; background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border); }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }

.badge { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge.live { background: rgba(0, 194, 168, .15); color: #36e3c4; }
.badge.progress { background: rgba(255, 193, 7, .15); color: #ffce4d; }
.badge.archived { background: rgba(154, 169, 196, .15); color: var(--muted); }

.card-link { font-weight: 700; font-size: .9rem; }

.empty { color: var(--muted); padding: 40px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------- About ---------- */
.about { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.about p { color: #c4cfe5; max-width: 760px; font-size: 1.05rem; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }
input, textarea, select {
    width: 100%; padding: 11px 14px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
    font: inherit; transition: .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 127, 255, .2); }
input[type=submit] { width: auto; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border); padding: 28px 0;
    color: var(--muted); text-align: center; font-size: .9rem;
}

/* ---------- Flash ---------- */
#message-box {
    display: none; position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
    z-index: 1000; padding: 12px 22px; border-radius: 12px; color: #fff; font-weight: 600;
    box-shadow: var(--shadow); max-width: 90%;
}
#message-box.success { background: #16a34a; }
#message-box.error { background: #dc2626; }

@media (max-width: 768px) {
    .contact-wrap { grid-template-columns: 1fr; }
    .nav a { margin-left: 16px; }
    .hero { padding: 64px 0 48px; }
}
