:root {
    color-scheme: light dark;
    --bg: #f4f6fb;
    --card: #ffffff;
    --accent: #005dba;
    --accent-light: #e1efff;
    --text: #1e2a36;
    --muted: #516173;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 18px;
}

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

a:hover {
    text-decoration: underline;
}

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

.site-header {
    background: #005dba;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand span {
    font-weight: 700;
    font-size: 1.4rem;
    color: white;
}

.site-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

.site-nav a {
    font-weight: 500;
    color: white;
    text-decoration: underline;
}

.site-main {
    flex: 1;
    padding: 2rem;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}

.site-footer {
    background: var(--card);
    border-top: 1px solid #d0d8e2;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.card,
.page {
    background: var(--card);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(15, 35, 95, 0.08);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-field input,
.form-field textarea {
    padding: 0.5rem;
    border: 1px solid #ccc;
    font-size: 18px;
    font-family: inherit;
}

.form-field textarea {
    resize: vertical;
    min-height: 80px;
}

button {
    background: #ccc;
    border: 1px solid #999;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

button:hover {
    background: #bbb;
}

.page-title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.page-subtitle {
    margin-top: -0.5rem;
    color: var(--muted);
}

.new-post {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.new-post input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ccc;
    font-size: 18px;
}

.posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post {
    padding: 1rem;
    border: 2px dashed #ccc;
    margin-bottom: 1rem;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.timestamp {
    font-size: 18px;
    color: var(--muted);
    font-style: italic;
}

.comments {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment {
    padding: 0.75rem 1rem;
    border: 2px dashed #ccc;
    margin: 0.5rem 0 0.5rem 30px;
}

.comment-body {
    color: var(--text);
}

.comment-form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.comment-form input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ccc;
    font-size: 18px;
}

.profile-card {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-following,
.profile-followers {
    margin-top: 1.5rem;
}

.profile-following ul,
.profile-followers ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.profile-bio {
    font-size: 1.05rem;
}

.profile-edit,
.profile-following {
    background: rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
    border-radius: 10px;
}

.following-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.empty-state {
    color: var(--muted);
    font-style: italic;
}

.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    background: rgba(0, 93, 186, 0.1);
}

.message-success {
    background: rgba(0, 186, 124, 0.18);
}

.message-info {
    background: rgba(0, 93, 186, 0.12);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 720px) {
    .site-main {
        padding: 1.5rem 1rem;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .new-post,
    .comment-form {
        flex-direction: column;
        align-items: stretch;
    }
}
