/* Shared theme for the "Community" pages (Blog / Team / Feedback) —
   templates/community_blog.html, community_article.html, community_team.html,
   community_feedback.html.

   These pages are reached ONLY from the gateway page's footer (never from
   /products or /skills-marketplace — see partials/public_footer.html and
   templates/_real_footer.html, which stay marketplace-only on purpose), so
   they intentionally use the gateway's own neutral --ink/--hairline palette
   instead of style_home.css's blue(products)/green(services) tokens. This
   is a deliberate duplicate of the token VALUES defined inline in
   templates/gateway.html's <style> block — keep the two in sync by hand if
   the gateway palette ever changes.

   2026-08 redesign: editorial/magazine treatment for the Blog specifically
   (full-bleed hero, asymmetric story grid, oversized display type) —
   requested with Nike's Stories page (nike.com/stories) as a look-and-feel
   reference: bold condensed display headlines, image-forward cards, a lot
   of negative space, minimal chrome. Team/Feedback got a lighter version
   of the same polish so the whole Community section still feels like one
   family of pages. */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #0f1b2d;
  --ink-soft: #4a5568;
  --ink-muted: #5c6779;
  --card-bg: #ffffff;
  --page-bg: #ffffff;
  --hairline: #ebedf0;
  --accent: #2952d6;
  --accent-dark: #1c3a9e;
  --danger: #b91c1c;
  --danger-rgb: 185, 28, 28;
  --warning: #b45309;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 12px 32px rgba(15, 27, 45, 0.10), 0 2px 8px rgba(15, 27, 45, 0.06);
  --shadow-btn: 0 8px 18px rgba(0,0,0,0.12);

  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  --text-xl: 28px;

  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;

  --font-display: 'Bebas Neue', 'Anton', Impact, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="dark"] {
  --ink: #f2f4f7;
  --ink-soft: #b9c0cc;
  --ink-muted: #828995;
  --card-bg: #1b1d22;
  --page-bg: #0c0d10;
  --hairline: #2a2d34;
  --accent: #6f96ff;
  --accent-dark: #a9c0ff;
  --danger: #f87171;
  --danger-rgb: 248, 113, 113;
  --warning: #fbbf24;
  --shadow-card: 0 12px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.35);
  --shadow-btn: 0 8px 18px rgba(0,0,0,0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.community-page {
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
  transition: background 0.2s, color 0.2s;
  -webkit-font-smoothing: antialiased;
}
.community-page a { color: var(--accent); text-decoration: none; }
.community-page a:hover { text-decoration: underline; }

/* ===================== Topbar ===================== */
.community-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px; border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--page-bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.community-topbar .logo img { height: 30px; width: auto; display: block; }
.community-topbar .back-link {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700;
}
.community-theme-toggle {
  border: 1.5px solid var(--hairline); background: var(--card-bg); color: var(--ink);
  font-size: var(--text-xs); cursor: pointer; padding: 6px 10px; border-radius: 999px;
}
.community-theme-toggle:hover { background: var(--hairline); }

.row-flex-14 { display: flex; align-items: center; gap: 14px; }

.community-hero h1 { font-size: var(--text-xl); font-weight: 800; margin-bottom: var(--space-xs); color: var(--ink); }
.community-hero p { color: var(--ink-soft); font-size: var(--text-md); margin-bottom: var(--space-lg); }

.community-card {
  background: var(--card-bg); border: 1px solid var(--hairline); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); padding: var(--space-md); margin-bottom: var(--space-md);
}

/* ===================== Blog — editorial layout ===================== */
.blog-page-wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px 96px; }
.blog-eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin: 48px 0 8px;
}
.blog-page-title {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em;
  font-size: clamp(40px, 6vw, 72px); line-height: 0.95; color: var(--ink); margin: 0 0 10px;
}
.blog-page-sub { color: var(--ink-soft); font-size: var(--text-md); max-width: 560px; margin-bottom: 40px; }

/* Featured hero story — full-bleed image, overlaid headline */
.story-hero {
  position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden;
  min-height: 460px; margin-bottom: 56px; background: var(--card-bg);
  box-shadow: var(--shadow-card);
}
.story-hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2,0.6,0.2,1);
}
.story-hero:hover img { transform: scale(1.045); }
.story-hero .hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.15) 45%, rgba(0,0,0,0.82) 100%);
}
.story-hero .hero-content {
  position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 460px; padding: 40px 44px; color: #fff;
}
.story-tag {
  display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.16); color: #fff; border: 1px solid rgba(255,255,255,0.3);
  margin-bottom: 14px; backdrop-filter: blur(4px);
}
.story-hero .hero-content h2 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0.005em;
  font-size: clamp(34px, 4.4vw, 56px); line-height: 1.0; margin: 0 0 12px; max-width: 780px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.story-hero .hero-excerpt {
  font-size: 15px; color: rgba(255,255,255,0.88); max-width: 560px; line-height: 1.55; margin: 0 0 14px;
}
.story-hero .hero-meta { font-size: 12px; color: rgba(255,255,255,0.7); font-weight: 600; letter-spacing: 0.02em; }

/* Fallback cover for a featured post with no cover_image — same visual
   idea as .founder-initials/.og-photo-fallback below (a big centered
   initial on an --accent field), reused here instead of leaving an
   empty box behind the hero-scrim gradient. */
.story-hero .hero-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 140px; color: rgba(255,255,255,0.14);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

/* Section label above the grid */
.stories-section-title {
  font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: 0.02em;
  color: var(--ink); margin: 0 0 24px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline);
}

/* Story grid — asymmetric editorial cards */
.story-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px;
}
@media (max-width: 900px) { .story-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .story-grid { grid-template-columns: 1fr; } .blog-page-wrap { padding: 0 20px 64px; } .story-hero .hero-content { padding: 28px 24px; } }

.story-card { display: block; group: story; }
.story-card .story-thumb {
  position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-md);
  overflow: hidden; margin-bottom: 16px; background: var(--hairline);
}
.story-card .story-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s cubic-bezier(0.2,0.6,0.2,1);
}
.story-card:hover .story-thumb img { transform: scale(1.08); }
/* Fallback cover for a card with no cover_image — matches
   .story-hero .hero-fallback above and .founder-initials/.og-photo-fallback
   further down: a big centered initial on an --accent field. */
.story-card .story-thumb-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 64px; color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}
.story-card .story-tag-inline {
  font-size: 11px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px; display: block;
}
.story-card h3 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em;
  font-size: 24px; line-height: 1.08; color: var(--ink); margin: 0 0 8px;
  transition: color 0.15s;
}
.story-card:hover h3 { color: var(--accent); }
.story-card .story-excerpt { color: var(--ink-soft); font-size: 13.5px; line-height: 1.55; margin-bottom: 8px; }
.story-card .story-meta { font-size: 11.5px; color: var(--ink-muted); font-weight: 600; letter-spacing: 0.02em; }

.blog-empty { color: var(--ink-muted); text-align: center; padding: 96px 0; font-size: var(--text-md); }

/* ===================== Article ===================== */
.article-hero {
  position: relative; width: 100%; min-height: 52vh; max-height: 620px; overflow: hidden;
}
.article-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article-hero .hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.85) 100%);
}
.article-hero .hero-inner {
  position: relative; z-index: 2; max-width: 880px; margin: 0 auto; height: 100%;
  min-height: 52vh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 48px 24px; color: #fff;
}
.article-hero h1 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0.005em;
  font-size: clamp(36px, 6vw, 64px); line-height: 1.0; margin: 0 0 14px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.article-byline { font-size: 13px; color: rgba(255,255,255,0.78); font-weight: 600; }
.article-byline.no-hero { color: var(--ink-muted); }

.article-content-wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px 96px; }
.article-body { font-size: 18px; line-height: 1.8; color: var(--ink); font-family: var(--font-body); }
.article-body h2 { font-family: var(--font-display); font-weight: 400; font-size: 34px; letter-spacing: 0.01em; color: var(--ink); margin: 40px 0 14px; line-height: 1.05; }
.article-body h3 { font-size: 21px; font-weight: 800; color: var(--ink); margin: 28px 0 10px; }
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px 22px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--ink); }
.article-body blockquote {
  margin: 32px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent);
  font-size: 21px; font-style: italic; color: var(--ink-soft); line-height: 1.5;
}
.article-body hr { border: none; border-top: 1px solid var(--hairline); margin: 40px 0; }
.article-back-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-top: 48px;
  padding-top: 24px; border-top: 1px solid var(--hairline); width: 100%;
}

/* ===================== Team ===================== */
.team-founder-card {
  display: flex; gap: 32px; align-items: center; flex-wrap: wrap;
  background: var(--card-bg); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 36px; margin-bottom: 8px;
}
.founder-photo {
  width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 3px solid var(--hairline);
  flex-shrink: 0;
}
.founder-photo-zoomable { cursor: zoom-in; transition: transform 0.15s, box-shadow 0.15s; }
.founder-photo-zoomable:hover { transform: scale(1.03); box-shadow: 0 6px 20px rgba(0,0,0,0.18); }
.founder-zoom-hint { font-size: 12px; color: var(--ink-muted); margin-top: 10px; }

/* Founder photo zoom overlay — click-to-zoom, same interaction as mxm_old */
#team-zoom-overlay {
  display: none; position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.88);
  align-items: center; justify-content: center; padding: 40px; cursor: zoom-out;
}
#team-zoom-overlay img {
  max-width: min(90vw, 640px); max-height: 85vh; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); cursor: default;
}
.team-zoom-close {
  position: absolute; top: 18px; right: 24px; background: none; border: none;
  color: #fff; font-size: 32px; line-height: 1; cursor: pointer; opacity: 0.85;
  padding: 4px 10px;
}
.team-zoom-close:hover { opacity: 1; }

/* Prev/next arrows inside the zoom overlay — styled to match the product
   lightbox's .carousel-btn arrows (homepage.html) for a consistent feel. */
.team-zoom-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
  border-radius: 50%; border: none; background: rgba(0,0,0,0.45); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background 0.15s;
}
.team-zoom-nav:hover { background: rgba(0,0,0,0.70); }
.team-zoom-prev { left: 18px; }
.team-zoom-next { right: 18px; }
.team-zoom-counter {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.5); color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; letter-spacing: 0.03em;
}
@media (max-width: 620px) {
  .team-zoom-nav { width: 38px; height: 38px; font-size: 22px; }
  .team-zoom-prev { left: 8px; }
  .team-zoom-next { right: 8px; }
}
.founder-initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-family: var(--font-display);
  font-size: 56px; letter-spacing: 0.02em;
}
.founder-info { flex: 1; min-width: 220px; }
.founder-info .name { font-family: var(--font-display); font-weight: 400; font-size: 34px; letter-spacing: 0.01em; margin-top: 10px; }
.founder-info .role { color: var(--accent); font-weight: 700; font-size: var(--text-sm); margin-bottom: 10px; }
.founder-info .bio { color: var(--ink-soft); font-size: var(--text-md); line-height: 1.7; margin: 0; }

/* OGs roster — full card layout ported from mxm_old's team.html (photo +
   badge + name/role/college/bio + contact button), recolored onto this
   page's own gateway-matched tokens (--accent/--ink/--card-bg/--hairline)
   instead of mxm_old's --brand palette. Structure/spacing/interactions are
   otherwise a deliberate 1:1 port — the old layout tested well. */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 4px; }
.og-card {
  display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.og-card:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(15,27,45,0.14); border-color: var(--accent); }
.og-photo-wrap { position: relative; width: 100%; height: 220px; overflow: hidden; border-bottom: 1px solid var(--hairline); }
.og-photo-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.og-card:hover .og-photo-wrap img { transform: scale(1.05); }
.og-photo-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-family: var(--font-display); font-size: 52px;
}
.og-badge {
  position: absolute; top: 14px; right: 14px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.og-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.og-name { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; color: var(--ink); font-size: 20px; margin-bottom: 4px; }
.og-role { color: var(--accent); font-weight: 700; font-size: 12.5px; margin-bottom: 6px; }
.og-college { color: var(--ink-muted); font-size: 12px; margin-bottom: 14px; font-weight: 600; }
.og-bio { color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; margin-bottom: 18px; }
.og-contact { margin-top: auto; border-top: 1px solid var(--hairline); padding-top: 14px; }
.btn-contact {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 10px; background: var(--page-bg); color: var(--accent); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); text-decoration: none; font-size: 13px; font-weight: 700;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-contact:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }

/* ===================== Feedback form ===================== */
.community-form .form-group { margin-bottom: var(--space-sm); }
.community-form label { display: block; font-size: var(--text-xs); color: var(--ink-soft); font-weight: 600; margin-bottom: 4px; }
.community-form input, .community-form select, .community-form textarea {
  width: 100%; border: 1.5px solid var(--hairline); background: var(--page-bg); color: var(--ink);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: var(--text-sm); font-family: inherit;
}
.community-form textarea { min-height: 120px; resize: vertical; }
.feedback-account-badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--page-bg);
  border: 1.5px solid var(--hairline); border-radius: var(--radius-sm); padding: 10px 12px;
  font-weight: 700; color: var(--ink); font-size: var(--text-sm);
}
.feedback-login-prompt { text-align: center; padding: 20px 8px; }
.star-rating { display: flex; gap: 4px; font-size: 26px; cursor: pointer; }
.star-rating .star { color: var(--hairline); transition: color 0.15s; }
.star-rating .star:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.star-rating .star.active { color: var(--warning); }
.community-submit {
  background: var(--ink); color: var(--page-bg); border: none; border-radius: 999px;
  padding: 12px 26px; font-weight: 800; font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer; transition: background 0.15s, opacity 0.15s;
}
.community-submit:hover { background: var(--accent); color: #fff; }
.community-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.community-form-msg { font-size: var(--text-xs); margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); display: none; }
.community-form-msg.is-error { display: block; background: rgba(var(--danger-rgb), 0.1); color: var(--danger); }
.community-form-msg.is-success { display: block; background: rgba(16,110,86,0.1); color: #0f6e56; }
[data-theme="dark"] .community-form-msg.is-success { color: #6ee7b7; background: rgba(110,231,183,0.12); }

/* ===================== Feedback feed — "What Students Say" =====================
   Ported from mxm_old's /feedback page (form + feed side by side), which
   showed every submission publicly and instantly with no review step —
   here the feed only shows feedback an admin has marked reviewed (see
   community.py's feedback_view()). Styled with the same editorial tokens
   as the blog's story-card, not mxm_old's own card look, per the
   "match the new blog look" choice. */
.feedback-layout { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .feedback-layout { grid-template-columns: 1fr; } }

.feedback-feed { min-width: 0; }
.feedback-card {
  background: var(--card-bg); border: 1px solid var(--hairline); border-radius: var(--radius-md);
  padding: 20px; margin-bottom: 16px; transition: box-shadow 0.15s, border-color 0.15s;
}
.feedback-card:hover { box-shadow: var(--shadow-card); border-color: var(--accent); }
.feedback-card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.feedback-card-name { font-family: var(--font-display); font-weight: 400; font-size: 18px; letter-spacing: 0.01em; color: var(--ink); }
.feedback-card-stars { color: var(--warning); font-size: 14px; letter-spacing: 1px; white-space: nowrap; }
.feedback-card-stars-dim { color: var(--hairline); }
.feedback-card-comment { color: var(--ink-soft); font-size: 14px; line-height: 1.6; margin: 0 0 14px; }
.feedback-card-meta {
  display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--ink-muted);
  border-top: 1px solid var(--hairline); padding-top: 12px; font-weight: 600;
}
.feedback-card-category {
  text-transform: uppercase; letter-spacing: 0.05em; background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent); padding: 3px 10px; border-radius: 999px; font-size: 10.5px;
}
.feedback-feed-empty {
  text-align: center; padding: 48px 24px; border: 1px dashed var(--hairline); border-radius: var(--radius-md);
}
