/*
 * Generic Posting Site
 * Modern light interface
 */


/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;

    background: #f4f6f9;
    color: #20242a;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    line-height: 1.6;
}


/* ---------------------------------------------------------
   Main Site Header
   --------------------------------------------------------- */

body > header {
    background: #ffffff;

    border-bottom: 1px solid #dfe3e8;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.05);
}

body > header > h1 {
    max-width: 850px;

    margin: 0 auto;
    padding: 24px 20px 8px;

    color: #243b75;

    font-size: 30px;
    font-weight: 700;

    letter-spacing: -0.5px;
}


/* ---------------------------------------------------------
   Navigation
   --------------------------------------------------------- */

nav {
    max-width: 850px;

    margin: 0 auto;
    padding: 0 20px 18px;

    display: flex;
    align-items: center;

    gap: 10px;
}

nav a {
    display: inline-block;

    padding: 7px 14px;

    background: #eef2ff;
    color: #314b9b;

    border: 1px solid #d6def7;
    border-radius: 7px;

    text-decoration: none;
    font-size: 14px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.1s ease;
}

nav a:hover {
    background: #314b9b;
    color: #ffffff;
}

nav a:active {
    transform: translateY(1px);
}


/* ---------------------------------------------------------
   Main Container
   --------------------------------------------------------- */

main {
    width: 100%;
    max-width: 850px;

    margin: 0 auto;
    padding: 35px 20px 60px;
}

section {
    margin-bottom: 35px;
}

section > h2 {
    margin-top: 0;
    margin-bottom: 18px;

    color: #28354d;

    font-size: 21px;
    font-weight: 650;
}


/* ---------------------------------------------------------
   New Post Card
   --------------------------------------------------------- */

main section:first-child {
    padding: 25px;

    background: #ffffff;

    border: 1px solid #dfe3e8;
    border-radius: 12px;

    box-shadow:
        0 4px 15px rgba(25, 40, 70, 0.06);
}


/* ---------------------------------------------------------
   Forms
   --------------------------------------------------------- */

form {
    width: 100%;
}

label {
    display: block;

    margin-top: 15px;
    margin-bottom: 6px;

    color: #34415a;

    font-size: 14px;
    font-weight: 650;
}

input,
textarea {
    width: 100%;

    padding: 11px 13px;

    background: #ffffff;
    color: #20242a;

    border: 1px solid #c9d0da;
    border-radius: 7px;

    font-family: inherit;
    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

input:hover,
textarea:hover {
    border-color: #9ba9bd;
}

input:focus,
textarea:focus {
    border-color: #526fd1;

    box-shadow:
        0 0 0 3px rgba(82, 111, 209, 0.15);
}

textarea {
    min-height: 130px;

    resize: vertical;
}


/* ---------------------------------------------------------
   Character Counter
   --------------------------------------------------------- */

form p {
    margin: 5px 0 0;

    color: #6d7787;

    font-size: 13px;
    text-align: right;
}

#character-count {
    font-weight: 600;
}


/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

button {
    display: inline-block;

    margin-top: 15px;
    padding: 10px 22px;

    background: #314b9b;
    color: #ffffff;

    border: 1px solid #314b9b;
    border-radius: 7px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 650;

    cursor: pointer;

    box-shadow:
        0 2px 5px rgba(49, 75, 155, 0.20);

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}

button:hover {
    background: #243b75;
    border-color: #243b75;

    box-shadow:
        0 4px 9px rgba(49, 75, 155, 0.25);
}

button:active {
    transform: translateY(1px);

    box-shadow:
        0 1px 3px rgba(49, 75, 155, 0.20);
}

button:focus-visible {
    outline: 3px solid rgba(82, 111, 209, 0.30);
    outline-offset: 2px;
}


/* ---------------------------------------------------------
   Feed
   --------------------------------------------------------- */

.feed {
    margin-top: 40px;
}


/* ---------------------------------------------------------
   Individual Post
   --------------------------------------------------------- */

.post {
    margin-bottom: 18px;
    padding: 22px;

    background: #ffffff;

    border: 1px solid #dfe3e8;
    border-radius: 12px;

    box-shadow:
        0 3px 12px rgba(25, 40, 70, 0.05);

    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.post:hover {
    transform: translateY(-1px);

    box-shadow:
        0 6px 18px rgba(25, 40, 70, 0.09);
}


/* ---------------------------------------------------------
   Post Header
   --------------------------------------------------------- */

.post-header {
    display: flex;
    align-items: center;

    gap: 13px;

    margin: 0 0 16px;
    padding: 0;

    background: transparent;

    border: 0;
    box-shadow: none;
}

.post-header strong {
    color: #243b75;

    font-size: 16px;
    font-weight: 700;
}


/* ---------------------------------------------------------
   Avatar
   --------------------------------------------------------- */

.avatar {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    background: #eef2ff;

    border: 2px solid #d6def7;
    border-radius: 50%;

    object-fit: cover;

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.08);
}


/* ---------------------------------------------------------
   Date / Time
   --------------------------------------------------------- */

.date,
.post-date {
    margin-top: 2px;

    color: #788395;

    font-size: 13px;
}


/* ---------------------------------------------------------
   Post Text
   --------------------------------------------------------- */

.entry {
    padding-top: 3px;

    color: #292f38;

    font-size: 16px;

    line-height: 1.7;

    overflow-wrap: anywhere;
}


/* ---------------------------------------------------------
   Avatar Upload Preview
   --------------------------------------------------------- */

#avatar-preview {
    margin-top: 12px;
}

#avatar-preview img {
    width: 90px;
    height: 90px;

    background: #ffffff;

    border: 3px solid #d6def7;
    border-radius: 50%;

    object-fit: cover;

    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.10);
}


/* ---------------------------------------------------------
   Empty Feed / Information Messages
   --------------------------------------------------------- */

.feed > p {
    padding: 25px;

    background: #ffffff;
    color: #6d7787;

    border: 1px dashed #bcc5d2;
    border-radius: 10px;

    text-align: center;
}


/* ---------------------------------------------------------
   Links
   --------------------------------------------------------- */

main a {
    color: #314b9b;

    text-decoration: none;
}

main a:hover {
    text-decoration: underline;
}


/* ---------------------------------------------------------
   Selection
   --------------------------------------------------------- */

::selection {
    background: #dbe3ff;
    color: #17275a;
}


/* ---------------------------------------------------------
   Responsive Layout
   --------------------------------------------------------- */

@media (max-width: 600px) {

    body > header > h1 {
        padding-top: 18px;

        font-size: 25px;
    }

    nav {
        flex-wrap: wrap;
    }

    main {
        padding:
            22px
            14px
            40px;
    }

    main section:first-child {
        padding: 18px;
    }

    .post {
        padding: 18px;
    }

    .avatar {
        width: 46px;
        height: 46px;
    }

    button {
        width: 100%;
    }

}


/* ---------------------------------------------------------
   Reduced Motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }

}
