* {
    box-sizing: border-box;
}

:root {
    --primary: #1560F1;
    --primary-dark: #0e43b0;
    --dark: #08111f;
    --text: #182033;
    --muted: #667085;
    --border: #e6eaf2;
    --bg: #f6f8fc;
    --card: #ffffff;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #f59e0b;
    --shadow: 0 24px 70px rgba(8, 17, 31, .10);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(21, 96, 241, .13), transparent 34rem),
        linear-gradient(180deg, #ffffff 0%, #f7f9fe 48%, #ffffff 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(230, 234, 242, .7);
}

.nav {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--dark);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #7a5cff);
    box-shadow: 0 14px 34px rgba(21, 96, 241, .30);
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}

.nav-links a:hover {
    color: var(--primary);
}

.hero {
    padding: 96px 0 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 46px;
    align-items: center;
}

.eyebrow {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .14em;
    font-weight: 800;
    margin: 0 0 12px;
}

h1, h2, h3 {
    color: var(--dark);
    letter-spacing: -0.05em;
    margin: 0;
    line-height: 1.03;
}

h1 {
    font-size: clamp(42px, 7vw, 76px);
}

h2 {
    font-size: clamp(30px, 4vw, 48px);
}

h3 {
    font-size: 24px;
}

.hero-text,
.section-head p,
.vision-list p,
.footer p,
.lead {
    color: var(--muted);
    line-height: 1.7;
}

.hero-text {
    font-size: 18px;
    max-width: 650px;
    margin: 24px 0 0;
}

.hero-actions,
.project-actions,
.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.hero-actions {
    margin-top: 32px;
}

.btn {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    transition: .18s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 16px 36px rgba(21, 96, 241, .25);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #eef4ff;
    color: var(--primary);
}

.btn-danger {
    background: #fee2e2;
    color: var(--danger);
}

.btn-small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

.link {
    color: var(--primary);
    font-weight: 800;
}

.hero-card {
    position: relative;
    overflow: hidden;
    padding: 38px;
    border-radius: 34px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(230, 234, 242, .9);
    box-shadow: var(--shadow);
}

.hero-card h2 {
    position: relative;
    z-index: 1;
}

.hero-card p {
    position: relative;
    z-index: 1;
    color: var(--muted);
    line-height: 1.7;
    margin-top: 16px;
}

.orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
}

.orb-1 {
    width: 190px;
    height: 190px;
    background: rgba(21, 96, 241, .14);
    right: -40px;
    top: -50px;
}

.orb-2 {
    width: 140px;
    height: 140px;
    background: rgba(122, 92, 255, .18);
    left: -40px;
    bottom: -40px;
}

.stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 34px;
}

.stats div {
    border-radius: 20px;
    background: #f6f8fc;
    padding: 18px;
    border: 1px solid var(--border);
}

.stats strong,
.stats span {
    display: block;
}

.stats strong {
    font-size: 24px;
    color: var(--dark);
}

.stats span {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.section {
    padding: 84px 0;
}

.section-muted {
    background: #f7f9fe;
    border-block: 1px solid var(--border);
}

.section-head {
    max-width: 760px;
    margin-bottom: 34px;
}

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

.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 16px 42px rgba(8, 17, 31, .06);
    transition: .2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.project-image {
    height: 160px;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, white), #f8fbff);
    display: grid;
    place-items: center;
    border-bottom: 1px solid var(--border);
}

.project-image img {
    width: 84px;
    height: 84px;
    object-fit: contain;
}

.project-image span,
.detail-image span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
    font-size: 26px;
    box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 28%, transparent);
    text-transform: uppercase;
}

.project-body {
    padding: 24px;
}

.project-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.project-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f0f4ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.project-body p {
    color: var(--muted);
    line-height: 1.6;
    min-height: 78px;
}

.vision-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 42px;
}

.vision-list {
    display: grid;
    gap: 16px;
}

.vision-list div {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
}

.vision-list strong {
    color: var(--dark);
    font-size: 18px;
}

.footer {
    padding: 34px 0;
    color: var(--muted);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: center;
}

.footer strong {
    color: var(--dark);
}

.footer a {
    color: var(--primary);
    font-weight: 800;
    margin-right: 18px;
}

.flash {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 700;
}

.flash-success {
    background: #dcfce7;
    color: #166534;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
}

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

.project-detail {
    max-width: 980px;
}

.back-link {
    color: var(--primary);
    font-weight: 800;
    display: inline-block;
    margin-bottom: 20px;
}

.detail-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 34px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.detail-image {
    min-height: 260px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
        #f8fbff;
}

.detail-image img {
    width: 130px;
    height: 130px;
    object-fit: contain;
}

.detail-content {
    padding: 40px;
}

.content {
    margin: 24px 0;
    color: var(--text);
    line-height: 1.75;
}

.auth-page {
    min-height: calc(100vh - 180px);
    display: grid;
    place-items: center;
    padding: 60px 20px;
}

.auth-card {
    width: min(460px, 100%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.auth-card p {
    color: var(--muted);
    line-height: 1.6;
}

.form {
    display: grid;
    gap: 16px;
}

.form label {
    display: grid;
    gap: 8px;
    font-weight: 800;
    color: var(--dark);
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    color: var(--text);
    background: #fff;
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 96, 241, .10);
}

.admin-layout {
    padding: 54px 0 84px;
}

.admin-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 24px;
}

.table-card,
.card-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 16px 42px rgba(8, 17, 31, .06);
    overflow: hidden;
}

.card-form {
    padding: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    background: #f8fbff;
}

.admin-table td small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.actions form {
    margin: 0;
}

.form-container {
    max-width: 900px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.checkboxes {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.checkbox {
    display: inline-flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px !important;
}

.checkbox input {
    width: auto;
}

.current-image {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-weight: 700;
}

.current-image img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 8px;
}

@media (max-width: 920px) {
    .hero-grid,
    .vision-grid,
    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-body p {
        min-height: auto;
    }

    .admin-head,
    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .nav {
        height: auto;
        padding: 16px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .nav-links {
        gap: 14px;
        flex-wrap: wrap;
    }

    .hero {
        padding-top: 52px;
    }

    .stats,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .detail-content {
        padding: 26px;
    }
}
