* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: #333;
    background: #fff;
}

.cover-photo {
    height: 280px;
    background: #ccc center/cover no-repeat;
}

.profile {
    text-align: center;
    padding: 0 20px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    margin-top: -55px;
}

.avatar-placeholder {
    display: inline-block;
    background: #6ba3b5;
}

.display-name {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 16px 0 8px;
}

.bio {
    color: #666;
    max-width: 500px;
    margin: 0 auto 20px;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 24px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.tabs a {
    color: #666;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding-bottom: 12px;
}

.tabs a.active {
    color: #2f8fce;
    border-bottom: 2px solid #2f8fce;
}

.feed {
    max-width: 540px;
    margin: 30px auto;
    padding: 0 16px;
}

.post-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 3px;
    margin-bottom: 24px;
    overflow: hidden;
}

.post-card img,
.post-card video {
    width: 100%;
    display: block;
}

.post-card h2,
.post-card .caption,
.post-card .body,
.post-card blockquote,
.post-card .link-title {
    padding: 16px 16px 0;
    margin: 0;
}

.post-card .caption > :first-child,
.post-card .body > :first-child,
.post-card blockquote > :first-child {
    margin-top: 0;
}

.post-card .caption > :last-child,
.post-card .body > :last-child,
.post-card blockquote > :last-child {
    margin-bottom: 0;
}

.post-card h2 {
    font-size: 1.2rem;
}

.post-card .link-title {
    display: block;
    font-weight: 600;
    color: #2f8fce;
    text-decoration: none;
}

.post-card blockquote {
    font-size: 1.4rem;
    font-style: italic;
}

.post-card cite {
    display: block;
    padding: 8px 16px 0;
    color: #888;
}

.post-card .tags {
    padding: 8px 16px 0;
}

.post-card .tags a {
    color: #888;
    text-decoration: none;
    margin-right: 8px;
    font-size: 0.85rem;
}

.post-card time {
    display: block;
    padding: 8px 16px 16px;
    color: #aaa;
    font-size: 0.8rem;
}

.pagination {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.archive-heading,
.tag-heading {
    font-size: 1.1rem;
    margin: 30px 0 12px;
}

footer {
    text-align: center;
    padding: 30px;
    color: #ccc;
    font-size: 0.8rem;
}

footer a {
    color: #ccc;
}

footer .footer-logout {
    display: inline;
    margin-left: 12px;
}

footer button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.login-form {
    max-width: 380px;
    margin: 80px auto;
    padding: 32px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.login-form h1 {
    font-size: 1.4rem;
    margin: 0 0 20px;
}

.dashboard {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.dashboard h1 {
    font-size: 1.6rem;
    margin: 0;
}

.form-error {
    color: #c0392b;
    background: #fdecea;
    border-radius: 5px;
    padding: 10px 14px;
    font-size: 0.9rem;
}

/* Dashboard header + nav */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid #eee;
}

.dashboard-header nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Buttons */

.btn {
    display: inline-block;
    border: none;
    border-radius: 5px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    background: #eef5fb;
    color: #2f8fce;
}

.btn:hover {
    background: #dcebf7;
}

.btn-primary {
    background: #2f8fce;
    color: #fff;
}

.btn-primary:hover {
    background: #267ab5;
}

.btn-secondary {
    background: #f1f1f1;
    color: #555;
}

.btn-secondary:hover {
    background: #e4e4e4;
}

.btn-danger {
    background: #fdecea;
    color: #c0392b;
}

.btn-danger:hover {
    background: #fbdedb;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.78rem;
}

.btn-link {
    color: #2f8fce;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.85rem;
    margin-right: 10px;
}

.btn-link:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
}

.back-link:hover {
    color: #2f8fce;
}

/* Post list table */

.post-list {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.post-list th {
    text-align: left;
    padding: 10px 14px;
    background: #fafafa;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    border-bottom: 1px solid #eee;
}

.post-list td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #f2f2f2;
    vertical-align: middle;
}

.post-list tbody tr:last-child td {
    border-bottom: none;
}

.post-list tbody tr:hover {
    background: #fafcfe;
}

.type-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
    background: #eef5fb;
    color: #2f8fce;
}

.type-badge.type-photo { background: #eaf6ee; color: #2e8b57; }
.type-badge.type-quote { background: #fbf3e6; color: #b5762f; }
.type-badge.type-link { background: #f1eefb; color: #6a4fc2; }

/* Forms */

.form-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 24px;
    max-width: 520px;
}

.dashboard label,
.login-form label {
    display: block;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
}

.dashboard input[type="text"],
.dashboard input[type="url"],
.dashboard input[type="file"],
.dashboard textarea,
.login-form input {
    width: 100%;
    padding: 9px 10px;
    margin-top: 6px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #333;
}

.dashboard textarea {
    min-height: 90px;
    resize: vertical;
}

.dashboard input:focus,
.login-form input:focus,
.dashboard textarea:focus {
    outline: none;
    border-color: #2f8fce;
    box-shadow: 0 0 0 3px rgba(47, 143, 206, 0.12);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 500 !important;
}

.checkbox-label input {
    width: auto !important;
    margin-top: 0 !important;
}

.preview-image {
    max-width: 200px;
    display: block;
    border-radius: 6px;
    border: 1px solid #eee;
    margin-bottom: 14px;
}
