:root {
    --ink: #34251f;
    --muted: #74665f;
    --forest: #5f8f24;
    --forest-dark: #3e6819;
    --lime: #f3b51b;
    --orange: #e87920;
    --red: #c83c2e;
    --cream: #fff8e9;
    --white: #ffffff;
    --line: #dfe7df;
    --danger: #a63c3c;
    --shadow: 0 16px 40px rgba(74, 54, 35, .10);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
    margin: 0;
    color: var(--ink);
    background: #fbfcf8;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

.site-header { background: rgba(255,255,255,.97); border-bottom: 4px solid var(--lime); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.header-inner { min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: block; min-width: 0; flex: 1 1 auto; text-decoration: none; }
.brand-logo-full { width: min(760px, 100%); height: auto; max-height: 64px; object-fit: contain; object-position: left center; }
.brand-mobile { display: none; }
nav { display: flex; align-items: center; gap: 24px; }
nav a { font-weight: 700; font-size: .92rem; text-decoration: none; }
nav a:hover { color: var(--forest); }
.nav-login { padding: 9px 14px; border: 1px solid var(--line); border-radius: 99px; }

.hero { position: relative; overflow: hidden; background: linear-gradient(125deg, var(--forest-dark), var(--forest)); color: white; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; opacity: .22; }
.hero::before { width: 340px; height: 340px; right: -80px; top: -190px; background: var(--lime); }
.hero::after { width: 180px; height: 180px; right: 24%; bottom: -130px; background: var(--orange); }
.hero-content { position: relative; padding-block: 88px 96px; }
.hero h1 { margin: 4px 0 14px; max-width: 760px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 7vw, 5.6rem); font-weight: 500; line-height: .96; letter-spacing: -.05em; }
.hero p:not(.eyebrow) { max-width: 600px; margin: 0; color: #d8e6e1; font-size: 1.15rem; }
.eyebrow { margin: 0 0 6px; color: var(--forest); font-size: .78rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.hero .eyebrow { color: #ffd75e; }

.feed-section { padding-block: 66px 96px; }
.section-heading, .dashboard-heading, .editor-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.section-heading h2, .dashboard-heading h1, .editor-heading h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; letter-spacing: -.035em; }
.post-count { color: var(--muted); font-weight: 700; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.post-card { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.media-frame { aspect-ratio: 4 / 3; background: #e8eee8; overflow: hidden; }
.media-frame img, .media-frame video { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 24px; }
.post-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.post-meta time { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.student-chip { display: inline-block; padding: 5px 11px; border-radius: 99px; background: #fff0bd; color: #76500a; font-size: .79rem; font-weight: 800; }
.post-body > p { margin: 0; font-size: 1.02rem; }
.empty-state { padding: 70px 20px; text-align: center; background: var(--cream); border-radius: var(--radius); }
.empty-state span { font-size: 2.8rem; }
.empty-state h3 { margin: 10px 0 2px; font-family: Georgia, serif; font-size: 1.8rem; }
.empty-state p { margin: 0; color: var(--muted); }

.site-footer { color: #f6eadf; background: #38281f; border-top: 5px solid var(--orange); }
.footer-inner { min-height: 120px; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: .86rem; }

.flash { margin-top: 20px; padding: 13px 16px; border-radius: 12px; font-weight: 700; }
.flash-success { color: #15583d; background: #ddf5e8; border: 1px solid #a7dfbf; }
.flash-error { color: #7d2727; background: #fbe4e4; border: 1px solid #efb4b4; }

.auth-shell { min-height: calc(100vh - 218px); display: grid; place-items: center; padding: 64px 20px; background: linear-gradient(135deg, #fff2bd, #fffaf0 55%, #e9f2d8); }
.auth-card, .editor-card, .admin-card { width: 100%; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card { max-width: 520px; padding: clamp(28px, 5vw, 48px); }
.auth-card h1 { margin: 0 0 7px; font-family: Georgia, serif; font-size: 2.25rem; font-weight: 500; line-height: 1.1; }
.auth-card > p:not(.eyebrow) { margin-top: 0; color: var(--muted); }
.stack-form { display: grid; gap: 20px; margin-top: 26px; }
.stack-form label { display: grid; gap: 7px; font-weight: 800; font-size: .92rem; }
input, textarea { width: 100%; border: 1px solid #cbd6ce; border-radius: 12px; padding: 12px 14px; color: var(--ink); background: white; font: inherit; }
input:focus, textarea:focus { outline: 3px solid rgba(243,181,27,.35); border-color: var(--forest); }
textarea { resize: vertical; min-height: 140px; }
label small { color: var(--muted); font-size: .78rem; font-weight: 500; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 18px; border: 0; border-radius: 12px; color: white; background: var(--forest); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--forest-dark); }
.button-secondary { color: var(--ink); background: #eef1ed; }
.button-secondary:hover { background: #e2e8e2; }
.button-danger { min-height: 40px; padding: 8px 13px; color: var(--danger); background: #f9eaea; }
.button-danger:hover { color: white; background: var(--danger); }
.form-errors { margin: 20px 0; padding: 12px 16px; color: #7d2727; background: #fbe8e8; border-left: 4px solid var(--danger); border-radius: 8px; }
.form-errors p { margin: 3px 0; }

.dashboard, .editor-shell { padding-block: 64px 96px; }
.dashboard-heading p, .editor-heading p { margin: 8px 0 0; color: var(--muted); }
.admin-card { overflow: hidden; }
.admin-card-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.admin-card-heading h2 { margin: 0; font-size: 1.18rem; }
.admin-card-heading span { color: var(--muted); font-size: .88rem; }
.admin-list { display: grid; }
.admin-row { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 20px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: 0; }
.admin-thumb { width: 90px; height: 68px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; color: white; background: var(--forest); font-size: 1.4rem; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-summary { min-width: 0; }
.admin-summary p { margin: 2px 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.admin-summary small { color: var(--muted); }
.admin-empty { padding: 42px 26px; color: var(--muted); text-align: center; }
.editor-card { max-width: 820px; padding: clamp(24px, 5vw, 48px); }
.wide-form { margin-top: 0; }
.file-field { padding: 18px; border: 1px dashed #a9b9ae; border-radius: 14px; background: #f7faf6; }
.file-field input { padding: 8px; background: transparent; border: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 8px; }
.text-link { color: var(--forest); font-weight: 800; }

@media (max-width: 760px) {
    .container { width: min(100% - 28px, 1120px); }
    .header-inner { min-height: 78px; gap: 14px; }
    .brand-logo-full { display: none; }
    .brand-mobile { display: flex; align-items: center; gap: 8px; }
    .brand-mascot { width: 66px; height: 48px; overflow: hidden; flex: 0 0 66px; }
    .brand-mascot img { width: auto; max-width: none; height: 48px; }
    .brand-mobile-copy strong, .brand-mobile-copy small { display: block; white-space: nowrap; }
    .brand-mobile-copy strong { color: var(--forest-dark); font-size: .88rem; line-height: 1.15; }
    .brand-mobile-copy small { color: var(--muted); font-size: .66rem; }
    .nav-login { padding: 8px 10px; }
    nav { gap: 13px; }
    nav a { font-size: .84rem; }
    nav > a:first-child { display: none; }
    .hero-content { padding-block: 66px 72px; }
    .post-grid { grid-template-columns: 1fr; }
    .section-heading, .dashboard-heading, .editor-heading { align-items: flex-start; flex-direction: column; }
    .dashboard-heading .button { width: 100%; }
    .admin-row { grid-template-columns: 66px 1fr; gap: 14px; padding: 16px; }
    .admin-thumb { width: 66px; height: 58px; }
    .delete-form { grid-column: 2; }
    .footer-inner { padding-block: 30px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; }
}

