:root {
  --navy: #0d2a4a;
  --sea: #1f6f8b;
  --foam: #e8f3f5;
  --sand: #f7f1e6;
  --sun: #f2a33a;
  --ink: #17212b;
  --muted: #5b6875;
  --line: #dde3e8;
  --card: #ffffff;
  --danger: #b3261e;
  --radius: 14px;
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--sand); line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--sea); }
h1, h2, h3 { font-family: var(--display); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: 1.6rem; }
[hidden] { display: none !important; }

/* header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1rem, 4vw, 2.5rem); background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.site-header a { color: #fff; text-decoration: none; }
.brand { font-family: var(--display); font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.brand-mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--sun); color: var(--navy); font-size: .8rem; font-family: var(--body); font-weight: 600; }
.site-header nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
#auth-area { display: flex; gap: .6rem; align-items: center; }
#auth-area .link-btn { color: #fff; }

/* hero */
.hero { position: relative; background: linear-gradient(160deg, var(--navy) 0%, var(--sea) 100%); color: #fff; padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem) clamp(4rem, 9vw, 7rem); }
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
.hero-class h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); }
.lede { font-size: 1.15rem; opacity: .92; max-width: 40em; }
.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 50px; fill: var(--sand); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: var(--sea); margin: 0 0 .5rem; }
.eyebrow.light { color: var(--sun); }
.badge { display: inline-block; background: var(--sun); color: var(--navy); font-weight: 600; padding: .25rem .8rem; border-radius: 999px; font-size: .9rem; margin: 0 0 1rem; }

/* layout */
main { max-width: 1100px; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 3rem; }
.section { margin-bottom: 3rem; }
.class-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; }
.class-side { position: sticky; top: 5rem; }
@media (max-width: 860px) { .class-layout { grid-template-columns: 1fr; } .class-side { position: static; order: -1; } }
.prose { max-width: 720px; }
.center { text-align: center; margin-top: 1rem; }

/* class grid */
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; }
.year { display: flex; flex-direction: column; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s, border-color .12s; }
.year:hover, .year:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(13,42,74,.12); border-color: var(--sea); }
.year-num { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.year-meta { font-size: .8rem; color: var(--muted); }
.year.active { border-color: var(--sea); background: var(--foam); }

/* cards and feed */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.feed { display: grid; gap: 1.25rem; }
.post { padding: 0; overflow: hidden; }
.post-photo img { width: 100%; max-height: 640px; object-fit: contain; background: #0b1a2b; }
.post-body { padding: 1rem 1.25rem 1.1rem; }
.post-text { white-space: pre-wrap; font-size: 1.05rem; margin: 0 0 .6rem; }
.byline { color: var(--muted); font-size: .9rem; margin: 0 0 .6rem; }
.byline strong { color: var(--ink); }
.post-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.post.is-hidden { opacity: .55; }
.heart { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .3rem .8rem; font: inherit; cursor: pointer; color: var(--ink); }
.heart.on { color: #c2185b; border-color: #f3b6cc; background: #fdf0f5; }
.comments { margin-top: .8rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 .7rem; display: grid; gap: .5rem; }
.comment-form { display: flex; gap: .5rem; }
.comment-form input { flex: 1; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted); }
.composer { margin-bottom: 2rem; }
.cta { margin-bottom: 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cta p { margin: 0; }
.preview img { max-height: 220px; border-radius: 10px; }
.mates { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.mates p { margin: .15rem 0 0; }

/* forms */
.stack { display: flex; flex-direction: column; gap: .45rem; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grow { flex: 1 1 220px; }
label { font-weight: 600; font-size: .9rem; }
input, textarea, select { font: inherit; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
input[type=file] { padding: .4rem; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--sea); outline-offset: 1px; }
.btn { font: inherit; font-weight: 600; background: var(--sea); color: #fff; border: 0; border-radius: 999px; padding: .65rem 1.3rem; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--navy); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-small { padding: .4rem .9rem; font-size: .9rem; }
.btn-ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
main .btn-ghost { color: var(--sea); }
main .btn-ghost:hover { background: var(--foam); }
.btn-light { background: var(--sun); color: var(--navy); }
.btn-light:hover { background: #fff; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--sea); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn.danger { color: var(--danger); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }

/* dialog */
.dlg { border: 0; border-radius: var(--radius); padding: 1.5rem; width: min(440px, calc(100vw - 2rem)); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.dlg::backdrop { background: rgba(13,42,74,.55); }
.dlg-close { position: absolute; top: .5rem; right: .75rem; }
.dlg-close button { background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .75rem 1.2rem; border-radius: 10px; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100vw - 2rem); }
.toast.error { background: var(--danger); }

.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1rem 3rem; border-top: 1px solid var(--line); }
