.site-header { overflow: visible; }

.academic-menu-wrap {
  position: relative;
  z-index: 120;
  flex: 0 0 auto;
}

.academic-menu-toggle {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f8f5ef;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(201, 168, 122, .62);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.academic-menu-toggle:hover,
.academic-menu-toggle:focus-visible,
.academic-menu-wrap.is-open .academic-menu-toggle {
  color: #233959;
  background: #c9a87a;
  border-color: #c9a87a;
  outline: none;
}
.academic-menu-icon { width: 17px; display: grid; gap: 4px; }
.academic-menu-icon i { height: 1px; display: block; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.academic-menu-wrap.is-open .academic-menu-icon i:first-child { transform: translateY(5px) rotate(45deg); }
.academic-menu-wrap.is-open .academic-menu-icon i:nth-child(2) { opacity: 0; }
.academic-menu-wrap.is-open .academic-menu-icon i:last-child { transform: translateY(-5px) rotate(-45deg); }

.academic-menu-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: min(340px, calc(100vw - 32px));
  padding: 22px;
  color: #f8f5ef;
  background: #233959;
  border: 1px solid rgba(201, 168, 122, .7);
  box-shadow: 0 24px 54px rgba(12, 22, 36, .28);
}
.academic-menu-panel[hidden] { display: none !important; }
.academic-menu-title { padding-bottom: 15px; display: grid; gap: 4px; border-bottom: 1px solid rgba(201, 168, 122, .32); }
.academic-menu-title span { color: #c9a87a; font-size: 10px; font-weight: 800; }
.academic-menu-title strong { font-size: 15px; line-height: 1.55; }
.academic-menu-links {
  width: 100%;
  padding: 10px 0;
  display: grid;
  gap: 0;
  overflow: visible;
  white-space: normal;
}
.academic-menu-links a {
  width: 100%;
  padding: 11px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(248, 245, 239, .9);
  border-bottom: 1px solid rgba(248, 245, 239, .1);
  font-size: 11px;
  transition: color .2s ease, padding .2s ease;
}
.academic-menu-links a::after { content: "←"; color: #c9a87a; }
.academic-menu-links a:hover { padding-right: 8px; color: #c9a87a; }
.academic-menu-actions { padding-top: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.academic-menu-actions a,
.academic-menu-actions button {
  min-height: 38px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 168, 122, .58);
  border-radius: 2px;
  color: #f8f5ef;
  background: transparent;
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
.academic-menu-actions a:hover,
.academic-menu-actions button:hover { color: #233959; background: #c9a87a; }
#copy-portfolio-status { grid-column: 1 / -1; min-height: 15px; color: #c9a87a; font-size: 9px; text-align: right; direction: rtl; }

.verification-panel {
  margin-top: 32px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(4, auto);
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(35, 57, 89, .14);
  border-right: 4px solid #a77d4f;
}
.verification-panel > div { display: grid; gap: 3px; }
.verification-panel > div span { color: #a77d4f; font-size: 10px; font-weight: 800; }
.verification-panel > div strong { color: #233959; font-size: 14px; }
.verification-panel > a {
  padding: 10px 12px;
  border: 1px solid rgba(35, 57, 89, .14);
  color: #233959;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.verification-panel > a:hover { color: #fff; background: #a77d4f; border-color: #a77d4f; }

.academic-evidence {
  color: #233959;
  background: #f1eadf;
  border-top: 1px solid rgba(35, 57, 89, .12);
  border-bottom: 1px solid rgba(35, 57, 89, .12);
}
.academic-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: 8vw;
  align-items: end;
  padding-bottom: 54px;
  border-bottom: 1px solid rgba(35, 57, 89, .16);
}
.academic-kicker { margin-bottom: 18px; color: #a77d4f; font-size: 11px; font-weight: 800; }
.academic-heading h2 { margin: 0; font-size: clamp(42px, 5.5vw, 76px); line-height: 1.12; font-weight: 500; letter-spacing: -1.5px; }
.academic-heading h2 em { color: #a77d4f; font-style: normal; }
.academic-heading > p { margin: 0; color: #526177; font-size: 16px; line-height: 2; }

.academic-subsection { padding: 60px 0; border-bottom: 1px solid rgba(35, 57, 89, .14); scroll-margin-top: 94px; }
.academic-subsection:last-child { padding-bottom: 0; border-bottom: 0; }
.subsection-heading { margin-bottom: 30px; display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start; }
.subsection-heading > span { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; background: #233959; font-size: 11px; }
.subsection-heading h3 { margin: 0 0 6px; font-size: 28px; font-weight: 600; }
.subsection-heading p { margin: 0; color: #526177; font-size: 13px; line-height: 1.8; }

.evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.evidence-card {
  min-height: 390px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(35, 57, 89, .14);
  box-shadow: 0 14px 32px rgba(35, 57, 89, .05);
}
.evidence-top { display: flex; justify-content: space-between; gap: 12px; color: #a77d4f; font-size: 10px; }
.evidence-top strong { color: #526177; font-weight: 700; }
.evidence-card h4 { margin: 27px 0 22px; min-height: 70px; font-size: 21px; line-height: 1.55; font-weight: 600; }
.evidence-card dl { margin: 0 0 24px; display: grid; gap: 0; }
.evidence-card dl div { padding: 10px 0; display: grid; grid-template-columns: 92px 1fr; gap: 12px; border-top: 1px solid rgba(35, 57, 89, .1); }
.evidence-card dt { color: #a77d4f; font-size: 10px; font-weight: 800; }
.evidence-card dd { margin: 0; color: #526177; font-size: 11px; line-height: 1.7; }
.evidence-card > a { margin-top: auto; padding-top: 15px; color: #233959; border-top: 1px solid rgba(35, 57, 89, .18); font-size: 11px; font-weight: 800; }
.evidence-note,
.matrix-note { margin: 18px 0 0; color: #526177; font-size: 10px; line-height: 1.8; }

.matrix-wrap { overflow-x: auto; background: rgba(255, 255, 255, .78); border: 1px solid rgba(35, 57, 89, .14); }
.learning-matrix { width: 100%; min-width: 920px; border-collapse: collapse; table-layout: fixed; }
.learning-matrix th { padding: 16px 14px; color: #fff; background: #233959; font-size: 11px; text-align: right; }
.learning-matrix td { padding: 17px 14px; color: #526177; border-bottom: 1px solid rgba(35, 57, 89, .1); font-size: 11px; line-height: 1.75; vertical-align: top; }
.learning-matrix tbody tr:last-child td { border-bottom: 0; }
.learning-matrix td:first-child { color: #233959; font-weight: 700; }
.mastery { display: inline-flex; padding: 5px 10px; color: #233959; background: rgba(201, 168, 122, .32); border-radius: 999px; font-weight: 800; }

.reflection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.reflection-grid article { min-height: 270px; padding: 28px; color: #f8f5ef; background: #233959; position: relative; overflow: hidden; }
.reflection-grid article::after { content: ""; position: absolute; left: -70px; bottom: -90px; width: 180px; height: 180px; border: 1px solid rgba(201, 168, 122, .25); border-radius: 50%; }
.reflection-grid span { color: #c9a87a; font-size: 10px; font-weight: 800; }
.reflection-grid h4 { margin: 28px 0 15px; font-size: 22px; line-height: 1.5; font-weight: 600; }
.reflection-grid p { margin: 0; color: rgba(248, 245, 239, .76); font-size: 12px; line-height: 1.95; }

.thesis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: rgba(35, 57, 89, .14); border: 1px solid rgba(35, 57, 89, .14); }
.thesis-grid article { min-height: 190px; padding: 26px; display: flex; flex-direction: column; background: rgba(255, 255, 255, .82); }
.thesis-grid article > span { color: #a77d4f; font-size: 10px; font-weight: 800; }
.thesis-grid article > strong { margin: 16px 0 10px; color: #233959; font-size: 19px; }
.thesis-grid article > p { margin: 0; color: #526177; font-size: 12px; line-height: 1.9; }
.thesis-grid article > a { margin-top: auto; padding-top: 15px; color: #233959; font-size: 11px; font-weight: 800; }
.thesis-download { color: #f8f5ef !important; background: #a77d4f !important; }
.thesis-download span,
.thesis-download strong,
.thesis-download p,
.thesis-download a { color: #fff !important; }

.academic-text-page { margin: 0; color: #233959; background: #f8f5ef; font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif; }
.academic-text-shell { width: min(980px, calc(100% - 34px)); margin: 0 auto; padding: 34px 0 80px; }
.academic-text-header { padding: 32px; color: #fff; background: #233959; border-bottom: 5px solid #c9a87a; }
.academic-text-header a { color: #c9a87a; font-size: 12px; font-weight: 800; }
.academic-text-header h1 { margin: 24px 0 8px; color: #fff; font-size: clamp(34px, 7vw, 62px); line-height: 1.2; }
.academic-text-header p { margin: 0; color: rgba(255,255,255,.75); line-height: 1.8; }
.academic-text-index { margin: 20px 0; padding: 20px; display: flex; flex-wrap: wrap; gap: 8px; background: #eee7dc; }
.academic-text-index a { padding: 8px 11px; color: #233959; background: #fff; border: 1px solid rgba(35,57,89,.14); font-size: 11px; font-weight: 700; }
.academic-text-section { padding: 32px 0; border-bottom: 1px solid rgba(35,57,89,.15); scroll-margin-top: 20px; }
.academic-text-section h2 { margin: 0 0 16px; color: #233959; font-size: 30px; }
.academic-text-section h3 { margin: 24px 0 8px; font-size: 19px; }
.academic-text-section p,
.academic-text-section li { color: #526177; font-size: 14px; line-height: 2; }
.academic-text-section table { width: 100%; border-collapse: collapse; background: #fff; }
.academic-text-section th,
.academic-text-section td { padding: 12px; border: 1px solid rgba(35,57,89,.14); font-size: 12px; line-height: 1.7; text-align: right; vertical-align: top; }
.academic-text-section th { color: #fff; background: #233959; }
.academic-text-section a { color: #a77d4f; font-weight: 800; }

@media (max-width: 1180px) {
  .verification-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verification-panel > div { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .academic-menu-wrap { position: absolute; top: 20px; left: 5vw; }
  .academic-menu-panel { top: calc(100% + 11px); }
  .academic-heading { grid-template-columns: 1fr; gap: 24px; }
  .evidence-grid,
  .reflection-grid { grid-template-columns: 1fr; }
  .evidence-card,
  .reflection-grid article { min-height: auto; }
  .thesis-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .academic-menu-wrap { left: 16px; }
  .academic-menu-toggle { min-height: 38px; padding: 0 13px; font-size: 11px; }
  .academic-menu-panel { position: fixed; top: 104px; right: 16px; left: 16px; width: auto; max-height: calc(100vh - 120px); overflow-y: auto; }
  .verification-panel { grid-template-columns: 1fr; padding: 18px; }
  .verification-panel > div { grid-column: auto; }
  .academic-heading h2 { letter-spacing: -.5px; }
  .academic-subsection { padding: 44px 0; }
  .subsection-heading { grid-template-columns: 40px 1fr; gap: 12px; }
  .subsection-heading > span { width: 38px; height: 38px; }
  .subsection-heading h3 { font-size: 23px; }
  .matrix-wrap { overflow: visible; background: transparent; border: 0; }
  .learning-matrix { min-width: 0; display: block; }
  .learning-matrix thead { display: none; }
  .learning-matrix tbody,
  .learning-matrix tr,
  .learning-matrix td { display: block; width: 100%; }
  .learning-matrix tr { margin-bottom: 14px; padding: 9px 16px; background: rgba(255,255,255,.82); border: 1px solid rgba(35,57,89,.14); }
  .learning-matrix td { padding: 10px 0; display: grid; grid-template-columns: 108px 1fr; gap: 10px; border-bottom: 1px solid rgba(35,57,89,.08); }
  .learning-matrix td::before { content: attr(data-label); color: #a77d4f; font-size: 9px; font-weight: 800; }
  .learning-matrix tr td:last-child { border-bottom: 0; }
  .academic-text-section { overflow-x: auto; }
}

@media print {
  .site-header,
  .contact,
  footer { display: none !important; }
  .academic-evidence { background: #fff; }
  .evidence-card,
  .reflection-grid article,
  .thesis-grid article { break-inside: avoid; box-shadow: none; }
}
