/* Typography & palette */
:root {
    --bg: #050915;
    --panel: rgba(17, 26, 48, 0.65);
    --panel-strong: rgba(20, 31, 60, 0.9);
    --primary: #4fb8ff;
    --accent: #9a7bff;
    --text: #e6ecff;
    --muted: #9ca9c9;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --radius: 18px;
    --transition: all 220ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(79, 184, 255, 0.08), transparent 35%),
                radial-gradient(circle at 80% 10%, rgba(154, 123, 255, 0.08), transparent 38%),
                radial-gradient(circle at 50% 70%, rgba(79, 184, 255, 0.06), transparent 45%),
                var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

p {
    margin: 0;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-main {
    flex: 1;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.9rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--primary);
    font-size: 0.75rem;
    margin-bottom: 12px;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text);
}

/* Forms */
.form-page {
    padding: 90px 0;
}

.form-shell {
    width: 100%;
    max-width: 840px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-card {
    padding: 32px 30px;
    background: linear-gradient(145deg, rgba(16, 24, 44, 0.88), rgba(11, 17, 32, 0.94));
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.4);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.form-card h1,
.form-card h2 {
    margin-bottom: 12px;
}

.form-subtitle {
    color: var(--muted);
    margin-bottom: 20px;
}

.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.form-input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.form-input:focus {
    outline: none;
    border-color: rgba(79, 184, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(79, 184, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

textarea.form-input {
    resize: vertical;
    min-height: 140px;
}

input[type="file"].form-input {
    padding: 11px 12px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.form-submit {
    padding-inline: 20px;
}

.form-message {
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.form-message.error {
    border-color: rgba(255, 107, 107, 0.4);
    background: rgba(255, 107, 107, 0.1);
    color: #ffc7c7;
}

.form-message.success {
    border-color: rgba(79, 184, 255, 0.4);
    background: rgba(79, 184, 255, 0.12);
    color: #d8ecff;
}

.form-footnote {
    color: var(--muted);
    margin-top: 10px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

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

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: calc(var(--radius) * 0.9);
    object-fit: cover;
    border: 1px solid var(--border);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
    margin-top: 8px;
}

/* Profile */
.profile-page {
    padding: 90px 0 120px;
    position: relative;
}

.profile-shell {
    display: flex;
    justify-content: center;
}

.profile-card {
    width: min(1180px, 96vw);
    border-radius: calc(var(--radius) * 1.6);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(145deg, rgba(16, 24, 44, 0.85), rgba(8, 12, 22, 0.95));
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.6), 0 0 80px rgba(79, 184, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: inherit;
    background: radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.06), transparent 45%);
    opacity: 0.7;
    pointer-events: none;
}

.profile-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 184, 255, 0.08), rgba(154, 123, 255, 0.06));
    mix-blend-mode: screen;
    opacity: 0.4;
    pointer-events: none;
}

.glass-profile {
    backdrop-filter: blur(12px);
}

.profile-card-body {
    position: relative;
    padding: 36px 34px;
    z-index: 1;
    max-height: 78vh;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.profile-card-body::-webkit-scrollbar {
    width: 8px;
}

.profile-card-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 32px;
    align-items: start;
}

.profile-left,
.profile-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: calc(var(--radius) * 1.1);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 40px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(6px);
}

.avatar-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: calc(var(--radius) * 1.2);
    overflow: hidden;
    background: linear-gradient(145deg, rgba(79, 184, 255, 0.12), rgba(154, 123, 255, 0.12));
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    color: var(--text);
    text-transform: uppercase;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: var(--transition);
}

.avatar-initial {
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    font-weight: 700;
}

.avatar-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-shell .avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.95rem;
}

[data-editing="false"] .avatar-shell {
    cursor: default;
    pointer-events: none;
}

[data-editing="true"] .avatar-shell {
    cursor: pointer;
    border-color: rgba(79, 184, 255, 0.4);
}

[data-editing="true"] .avatar-shell:hover .avatar-overlay {
    opacity: 1;
}

.avatar-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-bio {
    margin-top: 16px;
}

.bio-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.bio-input {
    min-height: 140px;
}

.profile-top {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.profile-username {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
}

.profile-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.profile-actions-bottom {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.meta-block,
.meta-edit {
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.editable-input { display: none; }
[data-editing="false"] .editable-text { display: inline; }
[data-editing="true"] .editable-text { display: none; }
[data-editing="true"] .editable-input { display: block; }

.edit-only { display: none !important; }
[data-editing="true"] .edit-only { display: block !important; }
[data-editing="true"] .profile-actions .edit-only { display: inline-flex !important; }

[data-editing="false"] .view-only { display: inline-flex !important; }
[data-editing="true"] .view-only { display: none !important; }

.pill-btn {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.95rem;
}

.compact-btn {
    padding: 10px 14px;
    border-radius: 12px;
}

.icon-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 860px) {
    .profile-card-body {
        max-height: none;
    }

    .profile-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .profile-actions {
        position: static;
        justify-content: flex-start;
        margin-top: 8px;
    }

    .profile-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .profile-actions-bottom {
        justify-content: flex-start;
    }

    .avatar-shell {
        max-width: 320px;
        margin: 0 auto;
    }

    .profile-meta {
        grid-template-columns: 1fr;
    }
}

.avatar-file-input {
    display: none;
}

.cta-row {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.info-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid var(--border);
    transition: var(--transition);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    color: var(--text);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 12px 28px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
}

.info-cta:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 16px 34px rgba(0, 0, 0, 0.4);
}

.info-cta-yt {
    background: linear-gradient(135deg, rgba(255, 86, 86, 0.28), rgba(162, 14, 24, 0.42));
    border-color: rgba(255, 122, 122, 0.55);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 14px 36px rgba(255, 64, 64, 0.3),
        0 0 42px rgba(255, 70, 70, 0.18);
}

.info-cta-yt:hover {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.36), rgba(182, 18, 30, 0.46));
    border-color: rgba(255, 134, 134, 0.65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 18px 44px rgba(255, 64, 64, 0.36),
        0 0 48px rgba(255, 78, 78, 0.24);
}

.info-cta-tg {
    background: linear-gradient(135deg, rgba(91, 198, 255, 0.28), rgba(44, 127, 230, 0.4));
    border-color: rgba(79, 184, 255, 0.6);
    color: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 14px 36px rgba(79, 184, 255, 0.32),
        0 0 42px rgba(79, 184, 255, 0.2);
}

.info-cta-tg:hover {
    background: linear-gradient(135deg, rgba(111, 206, 255, 0.34), rgba(52, 142, 240, 0.46));
    border-color: rgba(99, 198, 255, 0.68);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 18px 44px rgba(79, 184, 255, 0.36),
        0 0 48px rgba(79, 184, 255, 0.24);
}

.info-cta-dc {
    background: linear-gradient(135deg, rgba(159, 123, 255, 0.26), rgba(107, 79, 230, 0.38));
    border-color: rgba(154, 123, 255, 0.6);
    color: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 14px 36px rgba(154, 123, 255, 0.32),
        0 0 42px rgba(154, 123, 255, 0.2);
}

.info-cta-dc:hover {
    background: linear-gradient(135deg, rgba(175, 140, 255, 0.34), rgba(122, 94, 238, 0.44));
    border-color: rgba(170, 140, 255, 0.68);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 18px 44px rgba(154, 123, 255, 0.36),
        0 0 48px rgba(154, 123, 255, 0.24);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(16px);
    background: linear-gradient(90deg, rgba(9, 14, 28, 0.92), rgba(10, 14, 26, 0.7));
    border-bottom: 1px solid var(--border);
}

.site-header .shell {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 18px 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    font-weight: 800;
    letter-spacing: -0.05em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(79, 184, 255, 0.35);
}

.brand-mark.is-logo {
    background: none;
    box-shadow: none;
    padding: 0;
    flex-shrink: 0;
}

.brand-mark.is-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.brand-tag {
    font-size: 0.85rem;
    color: var(--muted);
}

.nav-links {
    display: flex;
    gap: 18px;
    justify-content: center;
    align-items: center;
}

.nav-links a {
    padding: 10px 12px;
    border-radius: 12px;
    transition: var(--transition);
    color: var(--muted);
}

.nav-links a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.nav-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
}

.user-menu {
    position: relative;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(79, 184, 255, 0.14), rgba(154, 123, 255, 0.14));
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.user-chip:hover,
.user-menu.open .user-chip {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 16px 36px rgba(79, 184, 255, 0.2);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12), rgba(79, 184, 255, 0.08));
    color: var(--text);
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-avatar-initial {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.user-name {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.user-caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--muted);
    transition: transform 180ms ease;
}

.user-menu.open .user-caret {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    padding: 8px;
    border-radius: 14px;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 180ms ease;
    z-index: 20;
}

.user-menu.open .user-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.user-dropdown::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 18px;
    width: 14px;
    height: 14px;
    background: var(--panel-strong);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: rotate(45deg);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-dropdown-item.danger {
    color: #ffc7c7;
}

.solid-btn,
.ghost-btn {
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid transparent;
    transition: var(--transition);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.solid-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #050915;
    box-shadow: 0 12px 30px rgba(79, 184, 255, 0.35);
}

.solid-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(154, 123, 255, 0.3);
}

.ghost-btn {
    border-color: var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}

.ghost-btn:hover {
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.solid-btn.danger {
    background: linear-gradient(135deg, #ff6b6b, #ff8f70);
    color: #fff;
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.32);
}

.solid-btn.danger:hover {
    box-shadow: 0 16px 40px rgba(255, 143, 112, 0.38);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 9, 21, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
}

.modal.open {
    display: flex;
}

.modal-card {
    width: min(420px, 100%);
    background: linear-gradient(145deg, rgba(16, 24, 44, 0.92), rgba(11, 17, 32, 0.98));
    border-radius: calc(var(--radius) * 1.1);
    border: 1px solid var(--border);
    padding: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.modal-body h3 {
    margin: 0 0 8px;
}

.modal-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.large {
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 1rem;
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    padding: 90px 0 110px;
    background: linear-gradient(135deg, rgba(21, 33, 62, 0.8), rgba(12, 19, 38, 0.95));
    border-bottom: 1px solid var(--border);
}

.hero-inner {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
}

.hero-copy {
    max-width: 640px;
    z-index: 3;
    position: relative;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 4.8rem);
    margin-bottom: 12px;
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 26px;
}

.hero-actions {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-characters {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.hero-figure {
    position: absolute;
    bottom: -80px;
    max-height: 900px;
    opacity: 0;
    filter: drop-shadow(0 25px 45px rgba(0,0,0,0.55));
    transform-origin: bottom center;
}

.hero-figure-left {
    left: -28%;
    animation: peek-left 1.2s ease forwards 0.35s;
}

.hero-figure-right {
    right: -28%;
    animation: peek-right 1.2s ease forwards 0.6s;
}

.hero-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    filter: blur(120px);
    opacity: 0.6;
    z-index: 0;
}

.hero-glow-left {
    left: -80px;
    bottom: -60px;
    background: radial-gradient(circle, rgba(79, 184, 255, 0.4), transparent 60%);
}

.hero-glow-right {
    right: -60px;
    top: 40px;
    background: radial-gradient(circle, rgba(154, 123, 255, 0.35), transparent 60%);
}

.hero-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.hero-effects canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.9;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 30px rgba(79, 184, 255, 0.35));
}

@keyframes peek-left {
    0% { transform: translateX(-55%) translateY(10%) rotate(-16deg) scale(1.08); opacity: 0; }
    100% { transform: translateX(-15%) translateY(10%) rotate(16deg) scale(1); opacity: 1; }
}

@keyframes peek-right {
    0% { transform: translateX(55%) translateY(10%) rotate(16deg) scale(1.08); opacity: 0; }
    100% { transform: translateX(15%) translateY(10%) rotate(-16deg) scale(1); opacity: 1; }
}

@keyframes pop-left {
    0% { transform: translateX(-65%) translateY(16%) rotate(-16deg) scale(0.92); opacity: 0; }
    60% { opacity: 1; }
    100% { transform: translateX(-60%) translateY(6%) rotate(-6deg) scale(1); opacity: 1; }
}

@keyframes pop-right {
    0% { transform: translateX(-35%) translateY(16%) rotate(16deg) scale(0.92); opacity: 0; }
    60% { opacity: 1; }
    100% { transform: translateX(-40%) translateY(6%) rotate(6deg) scale(1); opacity: 1; }
}

/* Info sections */
.info-section {
    padding: 80px 0;
    position: relative;
}

.info-section::before {
    content: "";
    position: absolute;
    inset: 20px;
    border-radius: calc(var(--radius) * 1.5);
    background: radial-gradient(circle at 20% 20%, rgba(79, 184, 255, 0.06), transparent 50%);
    z-index: 0;
}

.info-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 42px;
    padding: 40px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.4);
    box-shadow: var(--shadow);
    z-index: 1;
}

.info-grid.reverse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-copy h2 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    margin-bottom: 12px;
}

.info-copy .muted {
    font-size: 1.05rem;
}

.info-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: calc(var(--radius) * 1.2);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    overflow: hidden;
}

.placeholder {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.08), transparent 40%, rgba(255,255,255,0.08));
    mix-blend-mode: screen;
    transform: translateX(-100%);
    animation: shimmer 6s ease-in-out infinite;
}

.info-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
}

.placeholder.tg {
    background: linear-gradient(145deg, rgba(79, 184, 255, 0.18), rgba(79, 184, 255, 0.04)), #0f1a33;
}

.placeholder.dc {
    background: linear-gradient(145deg, rgba(154, 123, 255, 0.2), rgba(154, 123, 255, 0.04)), #0f0f2c;
}

.placeholder.gh {
    display: grid;
    place-items: center;
}

.placeholder.gh::after {
    display: none;
}

.info-section.github::before {
    background: radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.06), transparent 50%);
}

.info-cta-gh {
    background: linear-gradient(135deg, #24292e, #2f363d);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f4f7fb;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.info-cta-gh:hover {
    background: linear-gradient(135deg, #2f363d, #3a434c);
    border-color: rgba(255, 255, 255, 0.18);
}

.gh-visual {
    width: min(460px, 100%);
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, #161b22, #0d1117);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gh-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.gh-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.18);
}

.gh-mark {
    margin-left: auto;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.08em;
    font-size: 0.85rem;
}

.gh-body {
    flex: 1;
    padding: 18px 18px 14px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.gh-branch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gh-node {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3fb950;
    box-shadow: 0 0 0 6px rgba(63, 185, 80, 0.18);
}

.gh-node.accent {
    background: #58a6ff;
    box-shadow: 0 0 0 6px rgba(88, 166, 255, 0.18);
}

.gh-line {
    flex: 1;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #3fb950, rgba(63, 185, 80, 0.2));
}

.gh-line.short {
    flex: 0.6;
}

.gh-code {
    display: grid;
    gap: 8px;
}

.gh-row {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.gh-row.wide {
    width: 96%;
}

.gh-row.short {
    width: 62%;
}

.gh-row.accent {
    background: linear-gradient(90deg, #58a6ff, rgba(88, 166, 255, 0.2));
}

.info-section.youtube::before {
    background: radial-gradient(circle at 22% 22%, rgba(255, 92, 92, 0.14), transparent 54%);
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(120%); }
    100% { transform: translateX(120%); }
}

.placeholder.yt {
    background:
        radial-gradient(circle at 28% 32%, rgba(255, 110, 110, 0.45), transparent 46%),
        linear-gradient(145deg, rgba(255, 74, 74, 0.36), rgba(134, 8, 16, 0.82)),
        #140406;
    border-color: rgba(255, 118, 118, 0.55);
    box-shadow: 0 22px 60px rgba(255, 64, 64, 0.32);
}

.youtube .info-grid {
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 124, 124, 0.12), transparent 52%),
        radial-gradient(circle at 82% 22%, rgba(255, 68, 68, 0.08), transparent 56%),
        linear-gradient(135deg, rgba(62, 8, 16, 0.65), rgba(24, 6, 10, 0.62));
    border-color: rgba(255, 118, 118, 0.42);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 68px rgba(255, 68, 68, 0.26);
}

.youtube .eyebrow {
    color: #ff6b6b;
}

.youtube .chip {
    background: rgba(255, 92, 92, 0.08);
    border-color: rgba(255, 126, 126, 0.32);
}

.telegram .info-grid {
    background: linear-gradient(135deg, rgba(17, 37, 64, 0.9), rgba(14, 24, 45, 0.85));
}

.about-section {
    padding: 80px 0 120px;
    position: relative;
}

.about-section::before,
.about-section::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
}

.about-section::before {
    width: 420px;
    height: 420px;
    background: rgba(79, 184, 255, 0.12);
    top: 6%;
    left: 4%;
}

.about-section::after {
    width: 360px;
    height: 360px;
    background: rgba(154, 123, 255, 0.12);
    bottom: 8%;
    right: 6%;
}

.about-title {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    margin: 6px 0 28px;
}

.about-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(260px, 380px) 1fr;
    gap: 28px;
    align-items: center;
    background: linear-gradient(145deg, rgba(16, 24, 44, 0.88), rgba(11, 17, 32, 0.95));
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.4);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    padding: 36px 38px;
    overflow: hidden;
    z-index: 1;
}

.about-card::after {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.05), transparent 46%);
    pointer-events: none;
    z-index: 0;
}

.about-figure {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.about-img-frame {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 4 / 5;
    border-radius: calc(var(--radius) * 1.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.06), transparent 55%),
                rgba(7, 11, 22, 0.92);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.about-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.about-text .chip-row {
    margin-top: 10px;
}

.projects-hero {
    padding: 90px 0 38px;
    width: min(1200px, 94vw);
    margin: 0 auto;
}

.projects-headline {
    font-size: clamp(2.6rem, 6vw, 3.8rem);
    letter-spacing: -0.03em;
    margin: 10px 0 12px;
}

.project-tags {
    margin-top: 14px;
}

.projects-grid {
    padding: 26px 0 140px;
}

.projects-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.projects-bg canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.project-scroller {
    display: flex;
    flex-direction: column;
    gap: 24px;
    scroll-snap-type: y mandatory;
    width: min(1200px, 94vw);
    margin: 0 auto;
}

.project-link {
    display: block;
    width: 100%;
    color: inherit;
}

.project-slide {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    padding: 14px 0;
}

.project-intro {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
}

.intro-animate {
    opacity: 0;
    transform: translateY(14px);
    animation: introFade 900ms ease forwards;
    animation-delay: var(--delay, 0s);
}

.intro-animate:nth-child(3) {
    animation-duration: 1000ms;
}

.scroll-hint {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.scroll-arrow {
    width: 22px;
    height: 32px;
    position: relative;
    animation: arrowBounce 1.25s ease-in-out infinite;
    display: inline-block;
}

.scroll-arrow::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    width: 14px;
    height: 14px;
    border: solid rgba(132, 182, 255, 0.9);
    border-width: 0 3px 3px 0;
    transform: translateX(-50%) rotate(45deg);
    border-radius: 3px;
}

.scroll-arrow::after {
    display: none;
}

.project-intro .projects-headline {
    font-size: clamp(2.8rem, 6vw, 4.2rem);
}

@keyframes introFade {
    0% {
        opacity: 0;
        transform: translateY(14px);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes arrowBounce {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
    100% {
        transform: translateY(0);
    }
}

.project-plaque {
    --tiltX: 0deg;
    --tiltY: 0deg;
    --plaqueScale: 0.92;
    --plaqueTranslateY: 0px;
    --cursorX: 50%;
    --cursorY: 50%;
    --cursorGlow: 0;
    --cursorScale: 1;
    width: min(1200px, 92vw);
    position: relative;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.6);
    overflow: hidden;
    background: linear-gradient(140deg, rgba(12, 18, 34, 0.95), rgba(6, 10, 20, 0.92));
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.6);
    transition: transform 600ms ease, box-shadow 500ms ease, border-color 220ms ease, opacity 420ms ease, filter 420ms ease;
    opacity: 0.2;
    filter: blur(10px);
    transform: perspective(1400px) translate3d(0, var(--plaqueTranslateY), 0) rotateX(var(--tiltX)) rotateY(var(--tiltY)) scale(var(--plaqueScale));
    transform-style: preserve-3d;
}

.project-plaque::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: inherit;
    background: radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.05), transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.project-plaque::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(circle at var(--cursorX) var(--cursorY),
            rgba(79, 184, 255, 0.18) 0%,
            rgba(154, 123, 255, 0.14) 16%,
            transparent 40%);
    opacity: var(--cursorGlow);
    transform: scale(var(--cursorScale));
    transition: opacity 240ms ease, transform 320ms ease;
    mix-blend-mode: screen;
    z-index: 1;
}

.project-plaque.alt::before {
    background: radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.05), transparent 52%);
}

.project-plaque.is-visible {
    opacity: 1;
    filter: drop-shadow(0 18px 60px rgba(0, 0, 0, 0.45));
    --plaqueScale: 1;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 90px rgba(79, 184, 255, 0.18);
}

.project-plaque:hover {
    --plaqueTranslateY: -6px;
    box-shadow: 0 32px 90px rgba(79, 184, 255, 0.25);
}

.project-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    isolation: isolate;
}

.project-video-layer {
    position: absolute;
    inset: -8%;
    filter: saturate(1.08);
}

.project-video {
    width: 110%;
    height: 110%;
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.22) contrast(1.05);
    mix-blend-mode: screen;
    transform: scale(1.02);
    transition: transform 800ms ease, opacity 400ms ease;
    position: absolute;
    inset: 0;
}

.project-plaque:hover .project-video {
    transform: scale(1.08);
    opacity: 0.62;
}

.project-video-fallback {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 28% 22%, rgba(79, 184, 255, 0.16), transparent 46%),
        radial-gradient(circle at 74% 34%, rgba(154, 123, 255, 0.18), transparent 52%),
        rgba(7, 11, 22, 0.92);
    display: grid;
    place-items: center;
    color: rgba(230, 236, 255, 0.9);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3da0ff, #7a6bff);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    vertical-align: middle;
    transform: translateY(-1px);
}

.profile-username-row,
.meta-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}


.project-video-fallback::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 32%);
    mix-blend-mode: soft-light;
}

.project-noise {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 0),
        linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 160px 100%;
    opacity: 0.24;
    mix-blend-mode: screen;
    pointer-events: none;
}

.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    padding: 28px;
    background:
        radial-gradient(circle at 50% 46%, rgba(5, 9, 21, 0.5), rgba(5, 9, 21, 0.82)),
        linear-gradient(180deg, rgba(5, 9, 21, 0.68) 0%, rgba(5, 9, 21, 0.92) 100%);
    z-index: 2;
    backdrop-filter: blur(4px);
}

.project-meta-top {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.project-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e8efff;
}

.project-status {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(79, 184, 255, 0.5);
    color: #9dd6ff;
    background: rgba(79, 184, 255, 0.12);
}

.project-status.soft {
    border-color: rgba(255, 255, 255, 0.36);
    color: #f7e6ff;
    background: rgba(255, 255, 255, 0.08);
}

.project-status.warm {
    border-color: rgba(255, 159, 98, 0.6);
    color: #ffd2a8;
    background: rgba(255, 159, 98, 0.15);
}

.project-name {
    font-size: clamp(2.6rem, 6vw, 3.8rem);
    letter-spacing: -0.04em;
    margin: 4px 0 6px;
}

.project-desc {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.chip-row.center {
    justify-content: center;
}
/* Blog list */
.blog-list-hero {
    padding: 70px 0 22px;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(circle at 14% 20%, rgba(79, 184, 255, 0.08), transparent 40%),
                radial-gradient(circle at 86% 12%, rgba(154, 123, 255, 0.08), transparent 42%),
                linear-gradient(135deg, rgba(12, 18, 34, 0.9), rgba(8, 12, 22, 0.92));
}

.blog-list-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.blog-list-head h1 {
    font-size: clamp(2.4rem, 5vw, 3rem);
    margin-bottom: 8px;
}

.blog-list-section {
    padding: 24px 0 90px;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pagination {
    padding: 20px 0 0;
    display: flex;
    justify-content: center;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ghost-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.post-card {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: 10px;
    align-items: stretch;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.2);
    overflow: hidden;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
    position: relative;
}

.post-card::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.04), transparent 40%);
    z-index: 0;
    pointer-events: none;
}

.post-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    min-height: 100%;
    max-height: 100%;
    z-index: 1;
    width:100%;
}

.post-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25));
}

.post-thumb.no-thumb {
    background: linear-gradient(135deg, rgba(79, 184, 255, 0.24), rgba(154, 123, 255, 0.2));
    display: grid;
    place-items: center;
}

.post-thumb-fallback {
    font-size: 2.2rem;
    font-weight: 700;
    color: #0a0f1d;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.post-body {
    position: relative;
    z-index: 1;
    padding: 20px 22px 18px;
    display: grid;
    gap: 12px;
    align-content: space-between;
}

.post-meta-top {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 0.95rem;
}

.bullet {
    opacity: 0.6;
}

.post-title {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.7rem);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a {
    color: #e9f1ff;
}

.post-title a:hover {
    color: #fff;
}

.post-excerpt {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.post-meta-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ghost-btn.tiny {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.95rem;
}

.post-empty {
    padding: 32px;
    border: 1px dashed var(--border);
    border-radius: calc(var(--radius) * 1.1);
    background: rgba(255, 255, 255, 0.02);
}

/* Post create */
.post-create-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-floating-errors {
    max-width: 1100px;
    margin: 0 auto 14px;
}

.create-hero {
    padding-bottom: 32px;
}

.upload-frame {
    display: block;
    position: relative;
    cursor: pointer;
}

.post-preview-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-drop {
    position: relative;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(79, 184, 255, 0.2), rgba(154, 123, 255, 0.18));
}

.upload-preview-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    opacity: 0;
    transition: var(--transition);
}

.upload-drop .post-thumb-overlay {
    opacity: 0.28;
}

.upload-hint {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 8px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(5, 8, 16, 0.25), rgba(5, 8, 16, 0.55));
    backdrop-filter: blur(1px);
    transition: var(--transition);
}

.upload-hint p {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.editable-title {
    margin-top: 6px;
}

.post-title-input {
    width: 100%;
    border: 1px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    padding: 6px 0 10px;
    transition: var(--transition);
}

.upload-frame.has-image .upload-preview-img {
    opacity: 1;
}

.upload-frame.has-image .upload-hint {
    opacity: 0;
}

.upload-frame.has-image .post-thumb-overlay {
    opacity: 0.16;
}

.post-title-input:focus {
    outline: none;
    border-color: rgba(79, 184, 255, 0.7);
    box-shadow: 0 8px 24px rgba(79, 184, 255, 0.1);
}

.post-title-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.field-errors {
    margin-top: 6px;
    color: #ffc7c7;
    font-size: 0.95rem;
}

.field-errors.compact {
    margin-top: 2px;
}

.create-content {
    padding-top: 28px;
}

.editor-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.2);
    padding: 18px 18px 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.editor-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.editor-card-head h3 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.editor-card-head .muted {
    display: block;
}

.editor-surface {
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.05);
    padding: 10px;
    background: rgba(10, 16, 30, 0.75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.editor-surface .post-editor-widget,
.editor-surface .django-ckeditor-widget {
    width: 100%;
}

.editor-surface iframe {
    width: 100% !important;
    background: transparent;
}

.editor-surface .cke_chrome {
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.05);
    background: rgba(9, 14, 26, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.editor-surface .cke_toolgroup {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border);
}

.editor-surface .cke_button:hover,
.editor-surface .cke_combo_button:hover {
    background: rgba(79, 184, 255, 0.12);
}

.editor-surface .cke_button_on,
.editor-surface .cke_combo_on,
.editor-surface .cke_combo_button:focus {
    background: rgba(79, 184, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(79, 184, 255, 0.25);
}

.editor-surface .cke_top,
.editor-surface .cke_bottom {
    background: transparent;
    border-color: var(--border);
}

.editor-surface .cke_contents {
    background: transparent;
    border-radius: 0 0 calc(var(--radius) * 0.9) calc(var(--radius) * 0.9);
}

.editor-surface .cke_editable {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.8;
}

.editor-surface .ck.ck-toolbar {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border);
    border-radius: calc(var(--radius) * 0.8) calc(var(--radius) * 0.8) 0 0;
}

.editor-surface .ck.ck-toolbar .ck.ck-button.ck-on,
.editor-surface .ck.ck-toolbar .ck.ck-button:hover {
    background: rgba(79, 184, 255, 0.16);
    color: #e9f1ff;
}

.editor-surface .ck.ck-toolbar .ck.ck-button.ck-on .ck-button__label,
.editor-surface .ck.ck-toolbar .ck.ck-button.ck-on .ck-icon {
    color: #e9f1ff;
    fill: #e9f1ff;
}

.editor-surface .ck.ck-editor__main > .ck-editor__editable {
    min-height: 360px;
    background: rgba(9, 14, 26, 0.85);
    border-color: var(--border);
    color: var(--text);
    line-height: 1.8;
}

.editor-surface .ck.ck-editor__main > .ck-editor__editable:not(.ck-focused) {
    border-color: var(--border);
}

.editor-surface .ck.ck-editor__editable {
    padding: 16px;
}

.create-actions {
    justify-content: flex-end;
    margin-top: 18px;
}

.post-admin-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 28px;
}

.solid-btn.danger {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.9), rgba(255, 85, 85, 0.8));
    border-color: rgba(255, 107, 107, 0.3);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
    z-index: 1200;
}

.modal-backdrop.open {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.modal-backdrop .modal {
    position: relative;
    inset: auto;
    display: block;
    padding: 22px;
    background: linear-gradient(145deg, rgba(16, 24, 44, 0.92), rgba(11, 17, 32, 0.98));
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    width: min(480px, 90vw);
}

.modal {
    width: min(480px, 90vw);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.1);
    padding: 22px;
    box-shadow: var(--shadow);
}

.modal h3 {
    margin-bottom: 6px;
}

.modal-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
/* Blog detail */
.post-hero {
    position: relative;
    padding: 68px 0 36px;
    background:
        radial-gradient(circle at 16% 18%, rgba(79, 184, 255, 0.1), transparent 42%),
        radial-gradient(circle at 82% 10%, rgba(154, 123, 255, 0.1), transparent 44%),
        linear-gradient(145deg, rgba(10, 16, 30, 0.96), rgba(8, 12, 22, 0.94));
    border-bottom: 1px solid var(--border);
}

.post-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-img, linear-gradient(135deg, #0c111c, #0c111c));
    background-size: cover;
    background-position: center;
    opacity: 0.24;
    filter: blur(4px);
}

.post-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 8, 16, 0.6), rgba(5, 8, 16, 0.9));
}

.post-hero-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--primary);
    font-weight: 600;
}

.back-link:hover {
    color: #8ac8ff;
}

.post-hero-frame {
    width: 100%;
    border-radius: calc(var(--radius) * 1.2);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.post-hero-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    position: relative;
}

.post-hero-img.no-thumb {
    background: linear-gradient(135deg, rgba(79, 184, 255, 0.24), rgba(154, 123, 255, 0.2));
    display: grid;
    place-items: center;
}

.post-hero-title {
    margin: 6px 0 0;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.post-meta-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 1rem;
}

.post-content-section {
    padding: 30px 0 120px;
}

.post-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6px 10px 0;
}

.post-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.post-text p {
    margin: 0 0 18px;
}

.discord .info-grid {
    background: linear-gradient(135deg, rgba(23, 18, 49, 0.9), rgba(13, 15, 28, 0.88));
}

/* Policy pages */
.policy-page {
    padding: 90px 0 80px;
}

.policy-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.policy-head h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 10px;
}

.policy-head .muted {
    max-width: 760px;
}

.policy-card {
    padding: 22px 20px;
    background: linear-gradient(145deg, rgba(16, 24, 44, 0.9), rgba(11, 17, 32, 0.96));
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.1);
    box-shadow: var(--shadow);
}

.policy-card h2 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.policy-card p {
    margin: 0;
}

.policy-list {
    list-style: disc;
    margin: 12px 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text);
}

.policy-list strong {
    color: #fff;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    width: min(1100px, calc(100% - 32px));
    display: none;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    background: rgba(10, 14, 28, 0.96);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    z-index: 1200;
}

.cookie-banner.is-visible {
    display: flex;
}

.cookie-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cookie-message a {
    color: var(--primary);
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
    font: inherit;
}

.link-btn:hover {
    color: #fff;
}

/* Footer */
.site-footer {
    padding: 48px 0 60px;
    background: #070b16;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    align-items: flex-start;
}

.footer-brand {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links h4,
.footer-meta h4 {
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-links a:hover {
    color: #fff;
}

.footer-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-meta a {
    transition: var(--transition);
}

.footer-meta a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 1080px) {
    .hero-figure-left,
    .hero-figure-right {
        max-height: 600px;
    }
}

@media (max-width: 960px) {
    .site-header .shell {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        gap: 12px;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
    }

    .hero {
        padding: 70px 0 120px;
    }

    .hero-inner {
        min-height: 68vh;
        padding-top: 12px;
    }

    .hero-copy {
        max-width: 720px;
        padding: 0 8px;
    }

    .hero-effects canvas {
        opacity: 0.75;
    }

    .hero-characters {
        inset: 0;
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }

    .hero-figure {
        max-height: 380px;
        bottom: -36px;
        left: 50%;
        right: auto;
        opacity: 0;
    }

    .hero-figure-left {
        animation: pop-left 1.1s ease forwards 0.25s;
    }

    .hero-figure-right {
        animation: pop-right 1.1s ease forwards 0.45s;
    }

    .hero-glow-left {
        left: -140px;
        bottom: -120px;
    }

    .hero-glow-right {
        right: -90px;
        top: 120px;
    }

    .projects-hero {
        padding: 70px 0 30px;
    }

    .project-grid {
        gap: 24px;
    }

    .project-overlay {
        padding: 24px;
    }

    .project-meta-top {
        flex-wrap: wrap;
        justify-content: center;
    }

    .project-desc {
        max-width: 640px;
    }

    .info-grid,
    .info-grid.reverse {
        grid-template-columns: 1fr;
        padding: 26px;
    }

    .about-card {
        grid-template-columns: 1fr;
        padding: 30px 26px;
    }

    .about-title {
        text-align: center;
    }

    .about-text {
        text-align: center;
        align-items: center;
    }

    .info-media {
        order: -1;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .blog-list-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .post-thumb {
        min-height: 220px;
    }

    .post-meta-bottom {
        flex-wrap: wrap;
    }

    .editor-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .create-actions {
        width: 100%;
        justify-content: space-between;
    }

    .cookie-banner {
        flex-direction: column;
        gap: 12px;
    }

    .cookie-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 16px 16px;
    }

    .site-header .brand-tag {
        display: none;
    }

    .hero {
        padding: 64px 0 110px;
    }

    .hero-inner {
        min-height: 60vh;
    }

    .hero-effects canvas {
        opacity: 0.65;
        filter: drop-shadow(0 0 18px rgba(79, 184, 255, 0.24));
    }

    .hero h1 {
        font-size: clamp(2.2rem, 9vw, 3rem);
    }

    .hero-figure {
        max-height: 300px;
        bottom: -12px;
    }

    .projects-hero {
        padding: 60px 0 22px;
    }

    .projects-headline {
        font-size: clamp(2.1rem, 8vw, 3rem);
    }

    .project-name {
        font-size: clamp(2.2rem, 9vw, 3.1rem);
    }

    .project-desc {
        font-size: 1rem;
    }

    .project-overlay {
        gap: 12px;
    }

    .project-grid {
        gap: 18px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .about-img-frame {
        max-width: 100%;
    }

    .hero-actions {
        width: 100%;
    }

    .solid-btn,
    .ghost-btn {
        width: 100%;
    }

    .post-body {
        padding: 18px 16px 16px;
    }

    .post-hero {
        padding: 60px 0 28px;
    }

    .post-content {
        padding: 20px 18px;
    }

    .cookie-banner {
        width: calc(100% - 24px);
        left: 12px;
        right: 12px;
        transform: none;
        bottom: 12px;
    }
}
