@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=DM+Sans:wght@400;500;700&family=Noto+Naskh+Arabic:wght@400;700&family=Noto+Sans+Arabic:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap");

/* =============================================================
    SCHOOL BLOG - MAIN STYLESHEET (EDITORIAL / EARLY-WEB 2026)
    ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Color palette - blacktop zine */
  --color-bg: #efede7;
  --color-bg-elevated: #faf9f5;
  --color-bg-muted: #d9d7d0;
  --color-border: #101010;
  --color-border-strong: #101010;
  --color-text: #101010;
  --color-text-muted: #4d4d49;
  --color-text-subtle: #777771;

  --color-accent: #e33d36;
  --color-accent-hover: #b82e2d;
  --color-accent-soft: #f5d8d2;
  --color-accent-alt: #e5e1d7;

  --color-success: #28745b;
  --color-warning: #b56a00;
  --color-danger: #b52f48;
  --color-official-bg: #14213d;
  --color-official-fg: #c8f000;
  --color-focus: #101010;

  /* Typography */
  --font-sans:
    "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Barlow Condensed", Impact, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  --fs-xs: 0.8125rem; /* 13px */
  --fs-sm: 0.9375rem; /* 15px */
  --fs-base: 1.0625rem; /* 17px */
  --fs-md: 1.1875rem; /* 19px */
  --fs-lg: 1.4375rem; /* 23px */
  --fs-xl: 1.875rem; /* 30px */
  --fs-2xl: 2.5rem; /* 40px */
  --fs-3xl: 3.5rem; /* 56px */
  --fs-4xl: 4.5rem; /* 72px */

  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-base: 1.5;
  --lh-loose: 1.7;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.5rem;
  --sp-8: 3rem;
  --sp-9: 4rem;
  --sp-10: 5.5rem;

  /* Radii - friendly, tactile print-sticker edges */
  --radius-sm: 0;
  --radius: 0;
  --radius-lg: 0;

  /* Shadows - physical offset */
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;

  /* Layout */
  --container: 1180px;
  --container-narrow: 760px;
  --container-wide: 1320px;

  /* Snappy Neo-Brutalist Transitions */
  --t-fast: 140ms ease-out;
  --t: 220ms ease-out;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #111111;
  --color-bg-elevated: #1b1b1a;
  --color-bg-muted: #30302e;
  --color-border: #f2efe5;
  --color-border-strong: #f2efe5;
  --color-text: #f2efe5;
  --color-text-muted: #c5c3ba;
  --color-text-subtle: #98968d;
  --color-accent: #ff554d;
  --color-accent-hover: #ff8174;
  --color-accent-soft: #512c2c;
  --color-accent-alt: #393936;
  --color-success: #77d6a4;
  --color-warning: #ffc15c;
  --color-danger: #ff9b91;
  --color-official-bg: #f2efe5;
  --color-official-fg: #191919;
  --color-focus: #6e9bff;
}

/* ---------- Base reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  background-image: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom indie scrollbar */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
  border-left: 2px solid var(--color-border);
}
::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border: 1px solid var(--color-border);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-hover);
}

/* Acid highlight text selection */
::selection {
  background: var(--color-accent);
  color: #111111;
}

img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--color-text);
  text-decoration: none;
  transition:
    color var(--t-fast),
    border-color var(--t-fast);
  border-bottom: 1px solid var(--color-accent);
  font-weight: 700;
}
a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
button {
  font: inherit;
  cursor: pointer;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--sp-4);
  line-height: var(--lh-snug);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0;
  font-family: var(--font-serif);
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
h1 {
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
  letter-spacing: 0;
}
h2 {
  font-size: var(--fs-2xl);
  letter-spacing: 0;
}
h3 {
  font-size: var(--fs-lg);
  letter-spacing: 0;
}
p {
  margin: 0 0 var(--sp-4);
  overflow-wrap: anywhere;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}
.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.section {
  padding: var(--sp-9) 0;
  position: relative;
  overflow: hidden;
}
.section::after,
.page-header::after {
  content: "";
  position: absolute;
  right: clamp(1rem, 5vw, 5rem);
  bottom: 1.5rem;
  width: 180px;
  height: 130px;
  background: url("../assets/logo/logo.jpg") center / contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
}
.section > *,
.page-header > * {
  position: relative;
  z-index: 1;
}
.section-tight {
  padding: var(--sp-7) 0;
}
.section-heading {
  margin-bottom: var(--sp-7);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--color-border);
  position: relative;
}
.section-heading h2 {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.01em;
}
.section-heading p {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--color-text-subtle);
  margin: 0;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius);
  border: 2px solid var(--color-border);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-family: var(--font-sans);
  text-transform: uppercase;
  line-height: 1.2;
  text-decoration: none;
  background: var(--color-bg-elevated);
  color: var(--color-text);
  box-shadow: none;
  transition:
    transform var(--t-fast),
    box-shadow var(--t-fast),
    background var(--t-fast),
    color var(--t-fast);
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: none;
  border-color: var(--color-border);
}
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}
.btn-primary {
  background: var(--color-accent);
  color: #14213d;
}
.btn-primary:hover {
  background: var(--color-text);
  color: var(--color-bg);
}
.btn-secondary {
  background: var(--color-bg);
  color: var(--color-text);
}
.btn-secondary:hover {
  background: var(--color-bg-muted);
  color: var(--color-text);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--color-bg-muted);
  border-color: var(--color-border);
  box-shadow: 3px 3px 0 var(--color-border);
}
.btn-block {
  width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: none;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 62px;
  padding: 4px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 0;
}
.brand:hover {
  text-decoration: none;
  border-bottom: 0;
}
.brand-logo {
  width: 146px;
  height: 76px;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-school {
  font-size: var(--fs-xs);
  color: var(--color-text-subtle);
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.brand-blog {
  font-size: var(--fs-sm);
  color: var(--color-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.nav-list {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  color: var(--color-text);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  border: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transition:
    background var(--t-fast),
    border-color var(--t-fast);
}
.nav-list a:hover {
  background: var(--color-accent);
  border-color: var(--color-border);
  text-decoration: none;
}
.nav-list a.is-active {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-border);
}
.nav-cta-item {
  margin-left: var(--sp-2);
}
.nav-cta {
  padding: 0.5rem 1rem;
}

.nav-lang {
  display: flex;
  align-items: center;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin-left: var(--sp-2);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: transparent;
  color: var(--color-text);
  transition:
    background var(--t-fast),
    color var(--t-fast),
    transform var(--t-fast);
}
.theme-toggle:hover {
  background: var(--color-text);
  color: var(--color-bg);
  transform: translateY(-1px);
}
.theme-toggle-icon {
  width: 11px;
  height: 11px;
  border: 1px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.theme-toggle-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  top: -2px;
  right: -2px;
  border-radius: 50%;
  background: var(--color-bg-elevated);
}
.lang-select {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--color-border);
  box-shadow: 2px 2px 0 var(--color-border);
  background: var(--color-bg-elevated);
  color: var(--color-text);
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  outline: none;
  cursor: pointer;
}
.lang-select:focus-visible {
  outline: 2px solid var(--color-focus);
}

.nav-toggle {
  display: none;
  background: var(--color-accent);
  border: 2px solid var(--color-border);
  box-shadow: 2px 2px 0 var(--color-border);
  padding: 0.5rem;
  width: 42px;
  height: 42px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 3px;
  background: var(--color-text);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(5rem, 12vw, 10rem) 0 clamp(4rem, 9vw, 7rem);
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: clamp(1rem, 7vw, 8rem);
  bottom: -3rem;
  width: clamp(220px, 30vw, 430px);
  height: clamp(220px, 30vw, 430px);
  transform: rotate(8deg);
  background: url("../assets/logo/logo.jpg") center / contain no-repeat;
  opacity: 0.09;
  pointer-events: none;
}
.hero-inner {
  max-width: 820px;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--color-accent);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  box-shadow: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--sp-5);
}
.hero h1 {
  font-size: clamp(3.5rem, 10vw, 8rem);
  line-height: 0.88;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
  max-width: 760px;
}
.hero-lede {
  font-size: var(--fs-md);
  font-family: var(--font-sans);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-6);
  max-width: 640px;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

/* ---------- Cards / Articles ---------- */
.grid {
  display: grid;
  gap: var(--sp-5);
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-border);
  border-radius: 0;
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition:
    border-color var(--t),
    box-shadow var(--t),
    transform var(--t),
    background var(--t);
  position: relative;
  animation: none;
  min-width: 0;
}
.card:hover {
  background: var(--color-bg-elevated);
  border-top-color: var(--color-accent);
  transform: translateY(-3px);
}
.article-card {
  min-height: 100%;
}
.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.card-title {
  font-size: var(--fs-md);
  margin-bottom: var(--sp-3);
  line-height: 1.25;
  font-weight: 700;
}
.card-title a {
  color: var(--color-text);
  border-bottom: 2px solid transparent;
}
.card-title a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-border);
}
.card-excerpt {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin-bottom: var(--sp-5);
  flex: 1;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  color: var(--color-text-subtle);
  margin-bottom: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 2px solid var(--color-border);
  text-transform: uppercase;
  min-width: 0;
}
.card-author {
  color: var(--color-text-muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.card-class {
  color: var(--color-text-subtle);
  overflow-wrap: anywhere;
}
.card-date {
  color: var(--color-text-subtle);
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--fs-sm);
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: var(--color-accent);
  align-self: flex-start;
  border-bottom: 2px solid transparent;
  transition:
    color var(--t-fast),
    border-color var(--t-fast);
}
.card-link:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-border);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  line-height: 1.2;
  letter-spacing: 0.02em;
  border: 2px solid var(--color-border);
}
.badge-category {
  background: var(--color-bg);
  color: var(--color-text);
}
.badge-official {
  background: var(--color-official-bg);
  color: var(--color-official-fg);
  padding-left: 0.5rem;
  box-shadow: 2px 2px 0 var(--color-border);
}
.badge-official .badge-icon {
  fill: currentColor;
}

/* ---------- Buttons / pagination ---------- */
.section-footer {
  text-align: center;
  margin-top: var(--sp-6);
}

/* ---------- Blog page filters ---------- */
.filters {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
  box-shadow: var(--shadow);
}
.filters-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-4);
  align-items: end;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.filter-field label {
  font-size: var(--fs-xs);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.filter-input,
.filter-select {
  width: 100%;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
  outline: none;
  box-shadow: 2px 2px 0 var(--color-border);
  transition:
    border-color var(--t-fast),
    background var(--t-fast),
    transform var(--t-fast);
}
.filter-input:focus,
.filter-select:focus {
  background: var(--color-accent-soft);
}

/* ---------- Article page ---------- */
.article-page {
  padding: var(--sp-8) 0 var(--sp-9);
}
.article-header {
  margin-bottom: var(--sp-6);
}
.article-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.article-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: 0;
  margin-bottom: var(--sp-4);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--color-border);
}
.article-meta-author {
  font-weight: 500;
  color: var(--color-text);
}
.article-meta-dot {
  color: var(--color-text-subtle);
}

.article-body {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
  color: var(--color-text);
}
.article-body p {
  margin-bottom: var(--sp-5);
}
.article-body p:last-child {
  margin-bottom: 0;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--color-text);
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: var(--sp-6);
  border: 1px solid var(--color-border);
  text-transform: uppercase;
}
.article-back:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.page-header .article-back {
  margin-top: var(--sp-5);
  margin-bottom: 0;
  color: var(--color-text);
  border-color: var(--color-border);
}
.page-header .article-back:hover {
  color: var(--color-bg-elevated);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* ---------- Related articles ---------- */
.related {
  margin-top: var(--sp-9);
  padding-top: var(--sp-7);
  border-top: 1px solid var(--color-border);
}
.related h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-5);
}

/* ---------- Official (administration) articles ----------
   Admin posts get a "bulletin" treatment: ink-navy paper,
   electric-lime rules, a rubber-stamp seal and a hard shadow.
   Colors are fixed so they stay distinct in both themes. */
.article-card--official,
.article-page--official {
  --official-ink: #14213d;
  --official-ink-deep: #0b1428;
  --official-lime: #c8f000;
  --official-paper: #f2efe5;
}

.article-card--official {
  --color-text: var(--official-paper);
  --color-text-muted: #c9cfdc;
  --color-text-subtle: #8f9ab3;
  --color-border: var(--official-lime);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent 0 14px,
      rgba(200, 240, 0, 0.035) 14px 15px
    ),
    var(--official-ink);
  color: var(--official-paper);
  border: 2px solid #101010;
  border-top: 6px solid var(--official-lime);
  box-shadow: 6px 6px 0 var(--official-lime), 6px 6px 0 2px #101010;
  overflow: hidden;
  isolation: isolate;
}
.article-card--official:hover {
  background:
    repeating-linear-gradient(
      -45deg,
      transparent 0 14px,
      rgba(200, 240, 0, 0.06) 14px 15px
    ),
    var(--official-ink-deep);
  border-top-color: var(--official-lime);
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--official-lime), 9px 9px 0 2px #101010;
}
/* Corner ribbon */
.article-card--official::before {
  content: attr(data-kicker);
  position: absolute;
  top: 18px;
  right: -46px;
  width: 170px;
  padding: 3px 0;
  transform: rotate(45deg);
  background: var(--official-lime);
  color: var(--official-ink);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  border-block: 2px solid #101010;
  z-index: 1;
  pointer-events: none;
}
/* Faint seal watermark */
.article-card--official::after {
  content: "★";
  position: absolute;
  right: -0.15em;
  bottom: -0.3em;
  font-size: 9rem;
  line-height: 1;
  color: var(--official-lime);
  opacity: 0.06;
  z-index: -1;
  pointer-events: none;
}
.article-card--official .card-num {
  visibility: hidden;
}
.article-card--official .badge-category {
  background: transparent;
  color: var(--official-paper);
  border-color: var(--official-paper);
}
.article-card--official .badge-official {
  background: var(--official-lime);
  color: var(--official-ink);
  border-color: #101010;
  box-shadow: none;
}
.article-card--official .card-title {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.article-card--official .card-title a:hover {
  color: var(--official-lime);
  border-bottom-color: var(--official-lime);
}
.article-card--official .card-meta {
  border-top: 2px dashed var(--official-lime);
}
.article-card--official .card-author {
  color: var(--official-lime);
}
.article-card--official .card-link {
  color: var(--official-ink);
  background: var(--official-lime);
  padding: 0.3rem 0.7rem;
  border: 2px solid #101010;
}
.article-card--official .card-link:hover {
  color: var(--official-lime);
  background: transparent;
  border-color: var(--official-lime);
}

/* Single article page */
.article-page--official {
  position: relative;
  background:
    linear-gradient(
      to bottom,
      var(--official-ink) 0,
      var(--official-ink) var(--official-band, 220px),
      transparent var(--official-band, 220px)
    );
}
.article-page--official .article-back {
  color: var(--official-paper);
  border-color: var(--official-paper);
  padding: 0.3rem 0.7rem;
}
.article-page--official .article-back:hover {
  color: var(--official-ink);
  background: var(--official-lime);
  border-color: var(--official-lime);
}
.article-page--official .article-header {
  position: relative;
  color: var(--official-paper);
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  border: 2px solid var(--official-lime);
  outline: 2px solid var(--official-lime);
  outline-offset: 5px;
  background:
    radial-gradient(rgba(200, 240, 0, 0.12) 1px, transparent 1.5px) 0 0 / 14px 14px,
    var(--official-ink-deep);
}
.article-page--official .article-header::before {
  content: "— " attr(data-kicker) " —";
  display: block;
  margin-bottom: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--official-lime);
}
/* Rubber-stamp seal */
.article-page--official .article-header::after {
  content: "★";
  position: absolute;
  top: -28px;
  right: 24px;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: var(--official-ink);
  background: var(--official-lime);
  border: 3px double var(--official-ink);
  outline: 2px solid #101010;
  border-radius: 50%;
  transform: rotate(-12deg);
  box-shadow: 4px 4px 0 #101010;
  animation: official-stamp 520ms cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
@keyframes official-stamp {
  from {
    opacity: 0;
    transform: rotate(-40deg) scale(2.2);
  }
  to {
    opacity: 1;
    transform: rotate(-12deg) scale(1);
  }
}
.article-page--official .badge-category {
  background: transparent;
  color: var(--official-paper);
  border-color: var(--official-paper);
}
.article-page--official .badge-official {
  background: var(--official-lime);
  color: var(--official-ink);
  border-color: #101010;
}
.article-page--official .article-title {
  color: var(--official-paper);
  text-transform: uppercase;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 0.98;
  max-width: 90%;
}
.article-page--official .article-meta {
  margin-bottom: 0;
  padding-bottom: 0;
  padding-top: var(--sp-4);
  border-bottom: 0;
  border-top: 2px dashed var(--official-lime);
  color: #c9cfdc;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.article-page--official .article-meta-author {
  color: var(--official-lime);
  font-weight: 700;
}
.article-page--official .article-meta-dot {
  color: #8f9ab3;
}
.article-page--official .article-body {
  margin-top: var(--sp-7);
  padding-inline-start: var(--sp-5);
  border-inline-start: 6px solid var(--official-ink);
}
html[data-theme="dark"] .article-page--official .article-body {
  border-inline-start-color: var(--official-lime);
}

@media (max-width: 640px) {
  .article-page--official .article-header {
    padding: var(--sp-5) var(--sp-4) var(--sp-4);
  }
  .article-page--official .article-header::after {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    top: -22px;
    right: 12px;
  }
  .article-page--official .article-title {
    max-width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .article-page--official .article-header::after {
    animation: none;
  }
}

/* ---------- Forms ---------- */
.form {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-lg);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.form-field-full {
  grid-column: 1 / -1;
}
.form label,
.form-field > label {
  font-size: var(--fs-sm);
  font-weight: 700;
  font-family: var(--font-sans);
  text-transform: uppercase;
  color: var(--color-text);
}
.form .help-text {
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  color: var(--color-text-subtle);
}
.form input[type="text"],
.form input[type="email"],
.form input[type="date"],
.form select,
.form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
  outline: none;
  box-shadow: 2px 2px 0 var(--color-border);
  transition:
    border-color var(--t-fast),
    background var(--t-fast);
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  background: var(--color-accent-soft);
}
.form textarea {
  min-height: 280px;
  resize: vertical;
  line-height: 1.5;
}
.form-actions {
  margin-top: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

.form-alert {
  padding: 0.9rem 1rem;
  border: 2px solid var(--color-border);
  box-shadow: 3px 3px 0 var(--color-border);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: var(--sp-4);
}
.form-alert-success {
  background: var(--color-accent-soft);
  color: var(--color-success);
}
.form-alert-error {
  background: var(--color-bg-muted);
  color: var(--color-danger);
}

/* ---------- Events page ---------- */
.events-section {
  margin-bottom: var(--sp-8);
}
.events-section h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--color-border);
}
.event-date {
  display: block;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.event-details {
  margin-bottom: var(--sp-4);
}
.event-details .event-date {
  margin-bottom: var(--sp-2);
}
.event-date-label {
  font-weight: 700;
}
.event-countdown {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-accent);
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
}

/* ---------- Community page ---------- */
.contributors-list {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.contributor {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 2px solid var(--color-border);
}
.contributor:last-child {
  border-bottom: 0;
}
.contributor-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  background: var(--color-accent-soft);
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--fs-sm);
  flex-shrink: 0;
}
.contributor-rank.rank-1 {
  background: var(--color-accent);
  color: var(--color-text);
}
.contributor-rank.rank-2 {
  background: var(--color-text);
  color: var(--color-bg);
}
.contributor-rank.rank-3 {
  background: var(--color-bg-muted);
  color: var(--color-text);
}
.contributor-info {
  flex: 1;
  min-width: 0;
}
.contributor-name {
  font-weight: 700;
  color: var(--color-text);
}
.contributor-class {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
}
.contributor-count {
  font-weight: 700;
  color: var(--color-text);
  font-family: var(--font-mono);
}

.achievements-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5);
}
.achievement {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-block-start: 5px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  background:
    radial-gradient(ellipse at 100% 0, var(--color-accent-soft), transparent 58%),
    var(--color-bg-elevated);
  box-shadow: 5px 5px 0 var(--color-border);
  transition:
    transform var(--t),
    box-shadow var(--t),
    border-color var(--t);
}
.achievement::before {
  content: "✦";
  position: absolute;
  inset-block-start: var(--sp-4);
  inset-inline-end: var(--sp-4);
  display: grid;
  place-items: center;
  width: 2.25rem;
  aspect-ratio: 1;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-accent);
  color: #101010;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 2px 2px 0 var(--color-border);
}
.achievement:hover {
  transform: translateY(-4px);
  border-block-start-color: var(--color-warning);
  box-shadow: 7px 8px 0 var(--color-border);
}
.achievement-title {
  max-width: 34rem;
  padding-inline-end: 2.5rem;
  font-family: var(--font-serif);
  font-size: clamp(var(--fs-lg), 2.5vw, var(--fs-xl));
  line-height: var(--lh-snug);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
  font-weight: 800;
}
.achievement-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-3);
  overflow-wrap: anywhere;
}
.achievement-student-details {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-3);
}
.achievement-student {
  color: var(--color-text);
  font-size: var(--fs-md);
  font-weight: 800;
  line-height: var(--lh-snug);
}
.achievement-class {
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
}
.achievement-date {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 var(--sp-2);
  border: 1px solid var(--color-border);
  background: var(--color-accent-soft);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.4;
}
.achievement-desc {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-loose);
  margin: 0;
}
@media (prefers-reduced-motion: reduce) {
  .achievement {
    transition: none;
  }
  .achievement:hover {
    transform: none;
  }
}

/* ---------- Page header (non-home) ---------- */
.page-header {
  background: var(--color-bg-elevated);
  border-bottom: 3px solid var(--color-border);
  padding: var(--sp-8) 0;
  position: relative;
  overflow: hidden;
}
.page-header h1 {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: var(--sp-3);
  line-height: 1.15;
  letter-spacing: 0;
}
.page-header p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
  text-transform: uppercase;
  margin: 0;
  max-width: 720px;
}

/* ---------- States (loading/empty/error) ---------- */
.state {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--color-text-muted);
  background: var(--color-bg-elevated);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
}
.state p {
  margin: 0;
}
.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: var(--sp-3);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner,
  .card {
    animation: none;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-elevated);
  border-top: 3px solid var(--color-border);
  padding: var(--sp-8) 0 var(--sp-5);
  margin-top: var(--sp-9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
}
.footer-heading {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: var(--sp-4);
  font-weight: 700;
  font-family: var(--font-mono);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--sp-2);
}
.footer-text {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  margin: 0 0 var(--sp-2);
  font-family: var(--font-mono);
}
.footer-text a {
  border-bottom: 1px solid var(--color-accent);
}
.footer-text a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.footer-list a {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition:
    color var(--t-fast),
    border-color var(--t-fast);
  align-self: flex-start;
}
.footer-list a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}
.social-link {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    transform var(--t-fast),
    border-color var(--t-fast),
    background var(--t-fast);
}
.social-icon {
  width: 1.25rem;
  height: 1.25rem;
}
.social-link:hover {
  transform: translateY(-2px);
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}
.footer-bottom {
  padding-top: var(--sp-5);
  border-top: 2px solid var(--color-border);
  text-align: center;
  color: var(--color-text-subtle);
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

/* ---------- About page ---------- */
.prose {
  max-width: var(--container-narrow);
  margin: 0 auto;
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
  color: var(--color-text);
}
.prose h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  margin-top: var(--sp-7);
  margin-bottom: var(--sp-3);
}
.prose p {
  margin-bottom: var(--sp-4);
}
.prose ul {
  padding-left: 1.4rem;
}
.prose li {
  margin-bottom: var(--sp-2);
}

/* ---------- Contact page ---------- */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
}

/* =============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================= */

/* Tablet and below */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .achievements-list {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 820px) {
  :root {
    --fs-base: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.5rem;
    --fs-2xl: 1.875rem;
    --fs-3xl: 2.25rem;
  }
  .section {
    padding: var(--sp-7) 0;
  }
  .brand-logo {
    width: 118px;
    height: 68px;
  }
  .section::after,
  .page-header::after {
    right: 0.75rem;
    bottom: 1rem;
    width: 120px;
    height: 88px;
  }
  .hero {
    padding: var(--sp-7) 0 var(--sp-9);
  }
  .hero::after {
    right: -2.5rem;
    bottom: -2.5rem;
    width: 190px;
    height: 190px;
    opacity: 0.07;
  }
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .filters-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }

  .nav-toggle {
    display: inline-flex;
    order: 3;
    margin-left: 0;
  }
  .header-inner {
    justify-content: flex-start;
  }
  .header-inner .brand {
    margin-right: auto;
  }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--sp-4) var(--sp-5);
    gap: var(--sp-3);
    display: none;
  }
  .primary-nav.is-open {
    display: flex;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list li {
    border-bottom: 1px solid var(--color-border);
  }
  .nav-list li:last-child {
    border-bottom: 0;
  }
  .nav-list a {
    display: block;
    padding: 0.85rem 0.25rem;
    border-radius: 0;
    overflow-wrap: anywhere;
  }
  .nav-cta-item {
    margin: var(--sp-2) 0 0;
  }
  .nav-cta {
    display: block;
    text-align: center;
  }
  .nav-lang {
    padding-top: var(--sp-3);
    border-top: 1px solid var(--color-border);
  }
  .lang-select {
    width: 100%;
  }
  .theme-toggle {
    order: 2;
    margin: 0 var(--sp-2) 0 0;
  }
  .site-header {
    position: relative;
  }

  .form-actions .btn {
    flex: 1 1 10rem;
    white-space: normal;
    text-align: center;
  }
}

/* Compact navigation for tablet widths where the full menu cannot fit. */
@media (min-width: 821px) and (max-width: 1200px) {
  .site-header {
    position: relative;
  }
  .header-inner {
    justify-content: flex-start;
  }
  .header-inner .brand {
    margin-right: auto;
  }
  .nav-toggle {
    display: inline-flex;
    order: 3;
    margin-left: 0;
  }
  .theme-toggle {
    order: 2;
    margin: 0 var(--sp-2) 0 0;
  }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--sp-4) var(--sp-5);
    gap: var(--sp-3);
    display: none;
  }
  .primary-nav.is-open {
    display: flex;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list li {
    border-bottom: 1px solid var(--color-border);
  }
  .nav-list li:last-child {
    border-bottom: 0;
  }
  .nav-list a {
    display: block;
    padding: 0.85rem 0.25rem;
    overflow-wrap: anywhere;
  }
  .nav-cta-item {
    margin: var(--sp-2) 0 0;
  }
  .nav-cta {
    display: block;
    text-align: center;
  }
  .nav-lang {
    padding-top: var(--sp-3);
    border-top: 1px solid var(--color-border);
  }
  .lang-select {
    width: 100%;
  }
}

/* Very small phones */
@media (max-width: 430px) {
  .container,
  .container-narrow,
  .container-wide {
    padding: 0 var(--sp-4);
  }
  .hero h1 {
    font-size: 2rem;
  }
  .article-title {
    font-size: 1.75rem;
  }
  .form {
    padding: var(--sp-4);
  }
  .card {
    padding: var(--sp-4);
  }
}
