* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: #f5f6f7;
    background-color: #0b0f12;
    min-height: 100vh;
    line-height: 1.72;
}

body.font-apple {
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

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

.artistic-background {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.9) saturate(0.85);
    z-index: -3;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.theme-light .artistic-background {
    opacity: 1;
}

.artistic-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 14, 18, 0.75) 0%, rgba(10, 14, 18, 0.35) 45%, rgba(10, 14, 18, 0.9) 100%);
    z-index: -2;
}

.brushstroke {
    position: fixed;
    z-index: -1;
    opacity: 0.06;
    pointer-events: none;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.25), transparent);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.brushstroke-1 {
    top: 10%;
    right: 8%;
    width: 280px;
    height: 90px;
}

.brushstroke-2 {
    bottom: 16%;
    left: 10%;
    width: 240px;
    height: 80px;
    transform: rotate(12deg);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 2;
    max-width: 1280px;
    margin: 0.75rem auto 0;
    padding: 0.75rem 2rem 0;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 0.8rem 1.4rem;
}

.nav-section {
    display: flex;
    align-items: center;
}

.nav-section-left {
    flex: 1 1 auto;
    gap: 1.6rem;
}

.nav-section-right {
    flex: 0 0 auto;
    gap: 1.2rem;
}

.nav-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.1;
    color: rgba(255, 255, 255, 0.92);
}

.nav-list {
    display: flex;
    gap: 1.4rem;
    font-size: 1rem;
    font-weight: 500;
}

.nav-separator {
    width: 1px;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 0.2rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.92);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.is-active {
    color: rgba(255, 255, 255, 1);
    border-color: transparent;
    background: transparent;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.7);
    text-underline-offset: 4px;
    text-decoration-thickness: 1.5px;
}

.nav-link.is-active:hover {
    border-color: transparent;
    background: transparent;
    text-decoration-color: rgba(255, 255, 255, 1);
}

.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-icon-link:hover {
    color: rgba(255, 255, 255, 1);
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.nav-icon-x {
    width: 16px;
    height: 16px;
}

.page-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
    display: grid;
    gap: 2rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
    padding: 2.4rem;
}

.admin-panel {
    max-width: 960px;
    margin: 0 auto;
}

.admin-form {
    display: grid;
    gap: 1rem;
}

.admin-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.admin-input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(10, 14, 18, 0.55);
    color: inherit;
}

.admin-button {
    width: fit-content;
    padding: 0.75rem 1.4rem;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.admin-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.admin-error {
    color: #ffb4b4;
    font-weight: 600;
}

.admin-stats {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-stat {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.92rem;
}

.admin-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
    font-weight: 600;
}

.post-figure {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    float: right;
    max-width: 420px;
    margin-left: 2rem;
}

.post-img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.post-figure figcaption {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    width: 100%;
    font-style: italic;
}

@media (max-width: 700px) {
    .post-figure {
        float: none;
        max-width: 100%;
        margin-left: 0;
        align-items: center;
    }
}

.site-footer {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 900px) {
    .site-header {
        padding: 0.5rem 1rem 0;
    }

    .nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .nav-section-left {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .nav-section-right {
        flex-wrap: wrap;
        gap: 0.8rem;
    }
}

@media (max-width: 700px) {
    .page-content {
        padding: 2.5rem 1.5rem 4rem;
    }

    .glass-card {
        padding: 2rem;
    }
}
