/* =========================================================
   Job Nyangenya Omanga — Personal Website
   Colours, fonts and spacing are set here in :root.
   Change a colour once here and it updates everywhere.
   ========================================================= */
:root {
  --ink: #1e1529;
  --ink-soft: #3d3249;
  --muted: #6b6277;
  --paper: #faf7f3;
  --paper-2: #f1ebf5;
  --card: #ffffff;
  --line: #e4dcea;
  --purple: #4a2470;
  --purple-2: #6a3a9c;
  --purple-tint: #efe6f7;
  --gold: #c4972f;
  --gold-tint: #f8eed6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30,21,41,.05), 0 8px 24px rgba(30,21,41,.06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.65;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--purple-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--purple); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--muted); }
.container { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: linear-gradient(135deg, #3a1a5c 0%, #4a2470 55%, #5e2a6e 100%); color: #f1eaf8; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .muted { color: #cdbbe0; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1rem;
}
.section-head { max-width: 720px; margin-bottom: 2.75rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 100; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.4rem;
  border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none;
  background: var(--purple); color: #fff; border: 1.5px solid var(--purple);
  transition: transform .15s ease, background .15s ease;
  cursor: pointer; font-family: var(--sans);
}
.btn:hover { background: var(--purple-2); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--purple); }
.btn-outline:hover { background: var(--purple-tint); color: var(--purple); }
.btn-light { background: #fff; color: var(--purple); border-color: #fff; }
.btn-light:hover { background: var(--gold-tint); color: var(--purple); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(250,247,243,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%; background: var(--purple); color: #fff;
  display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1rem;
}
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--sans); font-weight: 500; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: .93rem; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--purple); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); padding-bottom: 4px; }
.nav-links .btn { color: #fff; padding: .6rem 1.1rem; }
.nav-links .btn[aria-current="page"] { box-shadow: none; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

@media (max-width: 1120px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border: 0; padding-top: 1rem; }
  .nav-links a { display: block; padding: .9rem 0; font-size: 1rem; }
  .nav-links a[aria-current="page"] { box-shadow: none; color: var(--purple); }
  .nav-links .btn { display: flex; justify-content: center; }
}

/* ---------- Photo placeholders ----------
   Put your photo in /images with the file name shown.
   If the photo is missing, a labelled placeholder shows instead. */
.photo {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(135deg, #e6dcf1, #f5ead2);
  display: grid; place-items: center; text-align: center; color: var(--purple);
  aspect-ratio: 4 / 3;
}
.photo > span { font-size: .85rem; font-weight: 600; padding: 1rem; opacity: .75; }
.photo > span::before { content: "📷"; display: block; font-size: 1.6rem; margin-bottom: .25rem; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo.tall { aspect-ratio: 4 / 5; }
.photo.wide { aspect-ratio: 16 / 9; }
.photo.square { aspect-ratio: 1; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1 em { font-style: italic; color: var(--purple-2); font-weight: 500; }
.hero-photo { position: relative; }
.hero-photo .photo { box-shadow: var(--shadow); }
.hero-badge {
  position: absolute; left: -1.5rem; bottom: 2rem; background: #fff; border-radius: 12px;
  padding: .9rem 1.1rem; box-shadow: var(--shadow); font-size: .85rem; max-width: 230px;
}
.hero-badge strong { display: block; font-family: var(--serif); font-size: 1rem; color: var(--purple); }
.roles { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.roles li { font-size: .8rem; font-weight: 600; padding: .35rem .8rem; border-radius: 999px; background: var(--purple-tint); color: var(--purple); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 440px; }
  .hero-badge { left: 1rem; }
}

/* Page hero (inner pages) */
.page-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); max-width: 18ch; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }

/* ---------- Grids & cards ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .grid-2, .grid-3, .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
}
@media (max-width: 480px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow); height: 100%;
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--purple-tint); color: var(--purple);
  display: grid; place-items: center; margin-bottom: 1.1rem;
}
.icon svg { width: 24px; height: 24px; }
.card.link-card { text-decoration: none; color: inherit; display: block; transition: transform .15s, box-shadow .15s; }
.card.link-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(30,21,41,.1); }

/* Identity pillars */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); }
.pillar { padding: 1.75rem 1.5rem; border-right: 1px solid var(--line); }
.pillar:last-child { border-right: 0; }
.pillar .num { font-family: var(--serif); color: var(--gold); font-size: .95rem; }
.pillar h3 { font-size: 1.1rem; margin: .35rem 0 .3rem; }
.pillar p { font-size: .9rem; color: var(--muted); margin: 0; }
@media (max-width: 960px) { .pillars { grid-template-columns: repeat(2, 1fr); } .pillar:nth-child(2) { border-right: 0; } .pillar:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } .pillar { border-right: 0; border-bottom: 1px solid var(--line); } }

/* Values */
.values { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.value { padding: 1.4rem; border-radius: var(--radius); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }
.value h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.value p { font-size: .9rem; margin: 0; color: #d6c8e8; }
@media (max-width: 960px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.stat { text-align: center; padding: 1.75rem 1rem; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.stat .n { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--purple); font-weight: 600; line-height: 1; }
.stat .l { font-size: .88rem; color: var(--muted); margin-top: .5rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Credentials list */
.creds { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .6rem; }
.creds li { display: flex; gap: .75rem; align-items: flex-start; font-size: .97rem; }
.creds li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: .6rem; border-radius: 50%; background: var(--gold); }

/* Timeline */
.timeline { position: relative; margin: 0; padding: 0 0 0 2rem; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 6px; top: .5rem; bottom: .5rem; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-bottom: 2.25rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -2rem; top: .45rem; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--purple-2); }
.timeline li.current::before { background: var(--gold); border-color: var(--gold); }
.timeline .when { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.timeline h3 { font-size: 1.15rem; margin: .2rem 0 .3rem; }
.timeline p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Quote / testimonial */
.quote { background: var(--card); border-radius: var(--radius); padding: 2rem; border: 1px solid var(--line); position: relative; height: 100%; }
.quote::before { content: "“"; font-family: var(--serif); font-size: 4.5rem; color: var(--gold); line-height: 1; position: absolute; top: .6rem; left: 1.4rem; opacity: .5; }
.quote blockquote { margin: 1.5rem 0 1.25rem; font-family: var(--serif); font-size: 1.12rem; line-height: 1.5; color: var(--ink); }
.quote cite { font-style: normal; font-weight: 600; font-size: .9rem; }
.quote cite span { display: block; font-weight: 400; color: var(--muted); }
.big-quote { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.35; font-weight: 500; max-width: 26ch; margin: 0; }

/* Initiative blocks */
.initiative { padding: clamp(2.5rem, 5vw, 4rem) 0; border-top: 1px solid var(--line); }
.initiative:first-of-type { border-top: 0; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px; background: var(--gold-tint); color: #87631a; }
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0; }
.outcome { border-left: 3px solid var(--gold); padding: .2rem 0 .2rem 1rem; }
.outcome .n { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--purple); line-height: 1.1; }
.outcome .l { font-size: .85rem; color: var(--muted); }
.mini-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: .75rem; }
.mini-gallery .photo:first-child { grid-row: span 2; aspect-ratio: auto; height: 100%; }
.mini-gallery .photo { aspect-ratio: 4/3; }
@media (max-width: 560px) { .outcomes { grid-template-columns: 1fr; } }

/* Video */
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #2b1442; color: #ded0ee; display: grid; place-items: center; text-align: center; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .play { width: 64px; height: 64px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; margin: 0 auto .75rem; }
.video .play svg { width: 26px; height: 26px; fill: #fff; margin-left: 4px; }
.video small { display: block; font-size: .85rem; padding: 0 1rem; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.gallery .photo { aspect-ratio: 1; }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Articles ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip { font: inherit; font-size: .88rem; font-weight: 500; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); cursor: pointer; }
.chip:hover { border-color: var(--purple-2); }
.chip.active { background: var(--purple); border-color: var(--purple); color: #fff; }

.article-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 960px) { .article-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .article-list { grid-template-columns: 1fr; } }
.article-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(30,21,41,.1); color: inherit; }
.article-card .photo { border-radius: 0; aspect-ratio: 16/9; }
.article-card .body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.article-card .meta { font-size: .8rem; color: var(--muted); display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .6rem; }
.article-card .cat { color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.article-card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.article-card p { font-size: .95rem; color: var(--muted); margin: 0 0 1rem; }
.article-card .more { margin-top: auto; font-weight: 600; font-size: .9rem; color: var(--purple-2); }
.article-card.featured { grid-column: span 3; display: grid; grid-template-columns: 1.2fr 1fr; }
.article-card.featured .photo { aspect-ratio: auto; min-height: 320px; height: 100%; }
.article-card.featured .body { padding: 2.5rem; justify-content: center; }
.article-card.featured h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
@media (max-width: 960px) { .article-card.featured { grid-column: span 2; } }
@media (max-width: 620px) { .article-card.featured { grid-column: span 1; grid-template-columns: 1fr; } .article-card.featured .photo { min-height: 0; aspect-ratio: 16/9; } .article-card.featured .body { padding: 1.5rem; } }
.sample-flag { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #fde8e4; color: #a33a22; padding: .15rem .5rem; border-radius: 4px; }
.empty { padding: 3rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Single article */
.article-header { padding: clamp(3rem, 6vw, 5rem) 0 2rem; }
.article-header h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.article-header .meta { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; color: var(--muted); font-size: .92rem; margin-top: 1.25rem; align-items: center; }
.author-chip { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 600; }
.author-chip .brand-mark { width: 34px; height: 34px; font-size: .85rem; }
.prose { font-size: 1.12rem; line-height: 1.8; }
.prose h2 { font-size: 1.7rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.3rem; margin-top: 1.8rem; }
.prose blockquote { margin: 2rem 0; padding: .25rem 0 .25rem 1.5rem; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 1.3rem; color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.share { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 3rem 0; font-size: .9rem; }
.share a, .share button { font: inherit; font-size: .85rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--purple-2); color: var(--purple); }
.notice { background: var(--gold-tint); border: 1px solid #ecd9ab; padding: 1rem 1.25rem; border-radius: 10px; font-size: .92rem; color: #6b4e12; }
.feedback-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, #3a1a5c, #5a2d86); color: #f1eaf8; border-radius: 22px; padding: clamp(2.5rem, 6vw, 4.5rem); display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border-radius: 50%; background: rgba(196,151,47,.22); }
.cta-band h2 { color: #fff; }
.cta-band ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; position: relative; z-index: 1; }
.cta-band li { display: flex; gap: .7rem; align-items: center; font-weight: 500; }
.cta-band li::before { content: "✓"; width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); font-size: .8rem; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 620px) { .form .row { grid-template-columns: 1fr; } }
label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: .35rem; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .8rem 1rem; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--purple-2); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 150px; resize: vertical; }

.engage-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 860px) { .engage-types { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: #1d0f2e; color: #c3b4d6; padding: 4rem 0 2rem; margin-top: 0; font-size: .93rem; }
.site-footer a { color: #e6dcf2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-name small { color: #a994c4; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 3rem; padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .85rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
mark { background: #fff1bf; color: inherit; padding: .05em .25em; border-radius: 3px; }

/* Purple & gold touches */
.hero::before { content: ""; position: absolute; right: -10%; top: -20%; width: 55%; height: 140%; background: radial-gradient(closest-side, rgba(106,58,156,.14), transparent); pointer-events: none; }
.hero-photo .photo { border: 6px solid #fff; background: #f3f0f6; }
.hero-photo::after { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 2px solid var(--gold); border-radius: var(--radius); z-index: -1; }
.hero-photo { z-index: 0; }
.brand-mark { background: linear-gradient(135deg, var(--purple), var(--purple-2)); box-shadow: inset 0 0 0 2px rgba(196,151,47,.7); font-size: .85rem; }
.brand-name { font-size: 1.05rem; }
@media (max-width: 420px) { .brand-name { font-size: .92rem; } .brand-name small { display: none; } }

.timeline p.school { color: var(--purple-2); font-weight: 600; font-size: .92rem; margin: 0 0 .25rem; }

/* =========================================================
   Articles platform: accounts, editor, dashboard
   ========================================================= */
.account-bar { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; align-items: center; justify-content: flex-end; font-size: .88rem; margin-bottom: 1.25rem; min-height: 1.4em; }
.account-bar:empty { display: none; }
.account-bar .who { color: var(--muted); margin-right: auto; }
.account-bar a, .linklike { font-weight: 600; text-decoration: none; color: var(--purple-2); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.account-bar a:hover, .linklike:hover { text-decoration: underline; }
.list-tools { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.list-tools input[type=search] { max-width: 280px; border-radius: 999px; padding: .6rem 1.1rem; }
.chip .count { display: inline-block; min-width: 1.4em; font-size: .75rem; opacity: .7; margin-left: .15rem; }
.alert { padding: .9rem 1.1rem; border-radius: 10px; font-size: .93rem; margin-bottom: 1rem; border: 1px solid; }
.alert-error { background: #fdecea; border-color: #f3c2bb; color: #8a2414; }
.alert-success { background: #e9f6ee; border-color: #bfe3cb; color: #1d5b34; }
.alert-info { background: var(--purple-tint); border-color: #dccbef; color: var(--purple); }
.small { font-size: .85rem; } .small-link { font-size: .88rem; text-align: center; }
.status { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 999px; vertical-align: middle; }
.st-draft { background: #eeeaf2; color: #5b5266; } .st-pending { background: var(--gold-tint); color: #87631a; }
.st-published { background: #e3f4e8; color: #1d6b3a; } .st-rejected { background: #fdecea; color: #a33a22; }

/* auth */
.auth-wrap { width: min(1000px, 100% - 2.5rem); margin-inline: auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.auth-card { padding: 2rem; }
.auth-card .form { gap: 1rem; }
.tabs { display: flex; gap: .25rem; background: var(--paper-2); padding: .3rem; border-radius: 999px; margin-bottom: 1.5rem; }
.tabs button { flex: 1; font: inherit; font-weight: 600; font-size: .92rem; border: 0; background: none; padding: .6rem 1rem; border-radius: 999px; cursor: pointer; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--purple); box-shadow: 0 1px 4px rgba(30,21,41,.1); }
.tabs-sm { margin: 0; flex: 0 0 auto; } .tabs-sm button { padding: .35rem .9rem; font-size: .82rem; }
@media (max-width: 800px) { .auth-wrap { grid-template-columns: 1fr; } .auth-intro .creds { display: none; } }

/* editor */
.write-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; }
.write-aside { position: sticky; top: 92px; }
@media (max-width: 960px) { .write-grid { grid-template-columns: 1fr; } .write-aside { position: static; } }
.editor-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; flex-wrap: wrap; }
.toolbar { display: flex; flex-wrap: wrap; gap: .3rem; padding: .4rem; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--paper-2); }
.toolbar button { font: inherit; font-size: .85rem; border: 1px solid transparent; background: #fff; border-radius: 6px; padding: .35rem .7rem; cursor: pointer; color: var(--ink-soft); min-height: 34px; }
.toolbar button:hover { border-color: var(--purple-2); color: var(--purple); }
.editor { min-height: 420px; border-radius: 0 0 10px 10px; line-height: 1.7; font-size: 1.02rem; }
.editor-preview { min-height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 1.25rem 1.5rem; font-size: 1.02rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; font-size: .93rem; }
.check input { width: 18px; height: 18px; margin-top: .2rem; flex: 0 0 auto; }
#cover-preview .photo { max-width: 420px; margin-bottom: .4rem; }

/* dashboard */
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.75rem; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.dash-section-head h2 { font-size: 1.4rem; margin: 0; }
.admin-card { border-color: #dccbef; background: linear-gradient(180deg, #fbf8fe, #fff); }
.count-pill { display: inline-grid; place-items: center; min-width: 1.8em; height: 1.8em; padding: 0 .4em; border-radius: 999px; background: var(--gold); color: #fff; font-family: var(--sans); font-size: .8rem; vertical-align: middle; }
.dash-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem 1rem; padding: 1rem 0; border-top: 1px solid var(--line); align-items: center; }
.dash-row:first-child { border-top: 0; }
.dash-row h3 { font-size: 1.08rem; margin: .3rem 0 0; } .dash-row h3 a { color: var(--ink); text-decoration: none; } .dash-row h3 a:hover { color: var(--purple); }
.dash-row .meta { font-size: .8rem; color: var(--muted); } .dash-row .cat { color: var(--gold); font-weight: 600; }
.dash-row .note { font-size: .88rem; margin: .4rem 0 0; color: #8a2414; }
.dash-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.dash-extra { grid-column: 1 / -1; } .dash-extra:empty { display: none; }
@media (max-width: 620px) { .dash-row { grid-template-columns: 1fr; } .dash-actions { justify-content: flex-start; } }
.btn-sm { font: inherit; font-size: .8rem; font-weight: 600; padding: .4rem .8rem; min-height: 34px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); text-decoration: none; cursor: pointer; }
.btn-sm:hover { border-color: var(--purple-2); color: var(--purple); }
.btn-sm.ok { background: var(--purple); border-color: var(--purple); color: #fff; } .btn-sm.ok:hover { background: var(--purple-2); color: #fff; }
.btn-sm.danger { color: #a33a22; } .btn-sm.danger:hover { border-color: #a33a22; color: #a33a22; }
.confirm { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; background: var(--paper-2); border-radius: 10px; padding: .8rem 1rem; font-size: .9rem; }
.confirm textarea { min-height: 0; margin-top: .35rem; }
.toggle { display: inline-flex; align-items: center; gap: .6rem; font-size: .88rem; font-weight: 600; cursor: pointer; margin: 0; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle span { width: 42px; height: 24px; border-radius: 999px; background: #d5cddd; position: relative; transition: .2s; flex: 0 0 auto; }
.toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle input:checked + span { background: var(--purple-2); } .toggle input:checked + span::after { left: 21px; }
.toggle input:focus-visible + span { outline: 2px solid var(--purple-2); outline-offset: 2px; }
.empty h3 { color: var(--ink); }
.container > .account-bar:first-child { padding-top: 1rem; } .page-hero .container > .account-bar:first-child { padding-top: 0; }
[hidden] { display: none !important; }

.facts-card { padding: 2rem; }
.facts { margin: 0; display: grid; gap: 1rem; }
.facts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); padding-top: .2rem; }
.facts dd { margin: 0; font-family: var(--serif); font-size: 1.08rem; color: var(--ink); }
@media (max-width: 480px) { .facts div { grid-template-columns: 1fr; gap: .2rem; } }
