:root {
    --bg: #10131a;
    --card: rgba(27, 32, 48, 0.92);
    --card-solid: #1b2030;
    --card-soft: rgba(255, 255, 255, 0.08);
    --muted: #aab3c5;
    --text: #e9eef6;
    --text-dark: #222;
    --accent: #1abc9c;
    --accent-strong: #34d399;
    --danger: #e74c3c;
    --warning: #f1c40f;
    --ok: #2ecc71;
    --line: rgba(255, 255, 255, 0.12);
    --pill-bg: rgba(255, 255, 255, 0.92);
    --pill-hover: #e5e5e5;
    --container: 1100px;
    --radius: 16px;
    --shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
}

html {
    font-size: 16px;
}

body {
    min-height: 100vh;
    font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 500;
    line-height: 1.6;
    background:
            linear-gradient(rgba(16, 19, 26, 0.86), rgba(16, 19, 26, 0.94)),
            var(--bg);
    color: var(--text);
}

#bg-video {
    position: fixed;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px);
    transform: scale(1.03);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
            radial-gradient(circle at top left, rgba(26, 188, 156, 0.16), transparent 32rem),
            radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.14), transparent 30rem),
            rgba(16, 19, 26, 0.68);
    pointer-events: none;
}

img,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: #bfdbfe;
}

a:hover {
    color: #dbeafe;
}

.site-shell {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.site-header {
    display: grid;
    gap: 14px;
    margin-bottom: 28px;
}

.main-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(20, 24, 35, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.navigation-menu,
.owner-navigation-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.navigation-menu a,
.auth-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 15px;
    border-radius: 999px;
    background: var(--pill-bg);
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition:
            transform 0.2s ease,
            background 0.2s ease;
}

.navigation-menu a:hover,
.auth-links a:hover {
    background: var(--pill-hover);
    color: var(--text-dark);
    transform: translateY(-1px);
}

.account-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.account-summary {
    display: flex;
    flex-direction: column;
    min-width: max-content;
    padding: 7px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    line-height: 1.25;
}

.account-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.logout-form {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.logout-button {
    min-height: 40px;
    padding: 8px 15px;
    border: 1px solid rgba(248, 113, 113, 0.45);
    border-radius: 999px;
    background: rgba(127, 29, 29, 0.55);
    color: #fee2e2;
    box-shadow: none;
}

.logout-button:hover {
    background: rgba(185, 28, 28, 0.85);
    color: #ffffff;
}

.auth-links {
    display: flex;
    gap: 10px;
}

.owner-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 11px 16px;
    border: 1px solid rgba(26, 188, 156, 0.24);
    border-radius: 14px;
    background: rgba(15, 55, 55, 0.72);
    backdrop-filter: blur(10px);
}

.owner-navigation-title {
    flex-shrink: 0;
    color: #99f6e4;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.owner-navigation-links a {
    color: #d5fbf3;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.owner-navigation-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

main {
    display: block;
}

.hero,
.page-panel,
.card,
form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.hero,
.page-panel {
    padding: clamp(24px, 4vw, 48px);
}

.hero {
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -120px;
    width: 300px;
    height: 300px;
    border-radius: 999px;
    background: rgba(26, 188, 156, 0.12);
    pointer-events: none;
}

.hero > * {
    position: relative;
    z-index: 1;
}

h1,
h2,
h3 {
    line-height: 1.15;
    color: #ffffff;
}

h1 {
    margin: 0 0 18px;
    font-size: clamp(2.15rem, 6vw, 4.4rem);
    letter-spacing: -0.04em;
}

h2 {
    margin: 0 0 14px;
    font-size: clamp(1.45rem, 3vw, 2.1rem);
}

h3 {
    margin: 0 0 10px;
}

p {
    margin-top: 0;
}

.lead {
    max-width: 760px;
    color: #dbe5f5;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

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

.eyebrow {
    margin: 0 0 8px;
    color: #99f6e4;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.card {
    padding: 22px;
}

.card h2,
.card h3 {
    margin-top: 0;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 20px 0 0;
}

form {
    padding: 24px;
}

label {
    display: block;
    margin-bottom: 18px;
    color: #ffffff;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    font: inherit;
}

textarea {
    min-height: 170px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus,
a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(26, 188, 156, 0.65);
    outline-offset: 3px;
}

.error {
    display: block;
    margin-top: 6px;
    color: #fecaca;
    font-weight: 700;
}

.notice,
.form-summary {
    padding: 14px 16px;
    border-radius: 14px;
    margin: 0 0 20px;
}

.notice {
    border: 1px solid rgba(46, 204, 113, 0.45);
    background: rgba(20, 83, 45, 0.88);
}

.form-summary {
    border: 1px solid rgba(239, 68, 68, 0.6);
    background: rgba(127, 29, 29, 0.9);
}

.status,
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
}

.status-planned,
.status-draft,
.status-basic,
.badge.todo {
    background: #374151;
}

.status-in-progress,
.status-intermediate {
    background: #854d0e;
}

.status-completed,
.status-published,
.status-advanced,
.badge.ok {
    background: #166534;
}

.status-archived,
.badge.bad {
    background: #7f1d1d;
}

.progress-track,
.meter {
    width: 100%;
    height: 24px;
    overflow: hidden;
    border-radius: 999px;
    background: #2a3145;
}

.progress-value,
.meter__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    transition: width 0.35s ease;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 14px;
    background: var(--card-solid);
    box-shadow: var(--shadow);
}

th,
td {
    padding: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
}

th {
    background: #22283b;
    color: #ffffff;
}

tr:last-child td {
    border-bottom: 0;
}

.danger {
    background: #b91c1c;
    color: #ffffff;
}

.post-content {
    white-space: pre-line;
}

.site-footer {
    margin-top: 42px;
    color: var(--muted);
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 720px) {
    .main-navigation {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
        padding: 14px;
    }

    .navigation-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .navigation-menu li:first-child {
        grid-column: 1 / -1;
    }

    .navigation-menu a {
        width: 100%;
    }

    .account-navigation {
        justify-content: space-between;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid var(--line);
    }

    .account-summary {
        min-width: 0;
    }

    .owner-navigation {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .owner-navigation-links {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .owner-navigation-links a {
        display: block;
        padding: 9px 11px;
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.06);
    }

    .hero-with-photo {
        grid-template-columns: 1fr;
    }

    .hero-photo-wrapper {
        order: -1;
    }

    .hero-photo {
        width: min(72vw, 240px);
    }
}

.hero-with-photo {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.7fr);
    align-items: center;
    gap: 36px;
}

.hero-content {
    min-width: 0;
}

.hero-photo-wrapper {
    display: flex;
    justify-content: center;
}

.hero-photo {
    width: min(100%, 290px);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    box-shadow:
            0 22px 45px rgba(0, 0, 0, 0.42),
            0 0 0 8px rgba(26, 188, 156, 0.08);
}
