/*
Theme Name: Ahmed Okasha
Theme URI: https://ahmedokasha.com
Author: Ahmed Okasha
Author URI: https://ahmedokasha.com
Description: Custom theme for Ahmed Okasha — robotics control engineer and writer of Control Mind AI. Modern & Bold visual style: gradient mesh accents, Space Grotesk display type, IBM Plex Sans body text.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ahmed-okasha
*/

/* ---------- Design tokens ---------- */
:root {
  --bg: oklch(98% 0.005 260);
  --surface: oklch(100% 0 0);
  --ink: oklch(22% 0.02 260);
  --ink-muted: oklch(45% 0.02 260);
  --ink-soft: oklch(55% 0.02 260);
  --border: oklch(90% 0.02 260);
  --accent-1: oklch(55% 0.2 280);
  --accent-2: oklch(60% 0.19 320);
  --accent-3: oklch(70% 0.18 20);
  --accent-tint: oklch(94% 0.03 280);
  --accent-tint-ink: oklch(42% 0.18 280);
  --gradient-brand: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  --gradient-mesh: conic-gradient(from 210deg, oklch(78% 0.18 280), oklch(80% 0.17 320), oklch(82% 0.16 40), oklch(78% 0.18 280));
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --shadow-card: 0 30px 70px -30px oklch(40% 0.1 280 / 0.25);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --content-width: 1120px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font-family: inherit; font-size: inherit; }

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Top gradient bar ---------- */
.site-topbar {
  height: 6px;
  background: var(--gradient-brand);
}

/* ---------- Header / nav ---------- */
.site-header {
  padding: 32px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-brand);
  flex-shrink: 0;
  padding: 2px;
  box-sizing: border-box;
  display: block;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.primary-nav > ul {
  display: flex;
  align-items: center;
  gap: 36px;
  font-weight: 500;
  font-size: 15px;
  flex-wrap: wrap;
}
.primary-nav a {
  position: relative;
  padding-bottom: 4px;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent-1);
  transform: scaleX(0);
  transition: transform .15s ease;
}
.primary-nav a:hover::after,
.primary-nav .current-menu-item a::after { transform: scaleX(1); }

.primary-nav a:has(.ext-link) { display: inline-flex; align-items: center; gap: 4px; }
.ext-link { color: var(--ink-soft); flex-shrink: 0; }

/* ---------- Teaching Portfolio nav dropdown ---------- */
.primary-nav li.has-dropdown { position: relative; }
.primary-nav li.has-dropdown > a { display: inline-flex; align-items: center; gap: 5px; }
.primary-nav li.has-dropdown > a .caret { transition: transform .15s ease; }
.primary-nav li.has-dropdown:hover > a .caret,
.primary-nav li.has-dropdown:focus-within > a .caret { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 8px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 30;
}
.primary-nav li.has-dropdown:hover .dropdown-menu,
.primary-nav li.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.dropdown-menu a::after { display: none; }
.dropdown-menu a:hover { background: var(--accent-tint); color: var(--accent-tint-ink); }

/* mobile nav toggle */
.nav-toggle { display: none; }
@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
  }
  .primary-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav > ul { flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 16px; }

  /* dropdown becomes an always-visible indented sub-list on mobile */
  .primary-nav li.has-dropdown { width: 100%; }
  .primary-nav li.has-dropdown > a .caret { display: none; }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    min-width: 0;
    margin: 8px 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .dropdown-menu a { padding: 2px 0; font-size: 13.5px; color: var(--ink-soft); }
  .dropdown-menu a:hover { background: none; color: var(--accent-1); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 24px;
}
.hero-mesh {
  position: absolute;
  top: -320px; right: -280px;
  width: 820px; height: 820px;
  border-radius: 50%;
  background: var(--gradient-mesh);
  opacity: .35;
  filter: blur(40px);
  pointer-events: none;
}
.hero .container {
  position: relative;
  max-width: 900px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-tint);
  color: var(--accent-tint-ink);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  padding: 9px 20px;
  border-radius: 8px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(36px, 5.4vw, 62px);
  margin-bottom: 22px;
}
.hero .gradient-word {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .tagline {
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 500;
  color: var(--ink-muted);
  max-width: 620px;
  margin: 0 auto 16px;
}
.hero .intro {
  font-size: 16.5px;
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 auto;
}
.hero .hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: filter .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--accent-1); color: var(--accent-1); }

/* ---------- Subscribe card ---------- */
.subscribe-section { padding: 40px 0 96px; }
.subscribe-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 38px 42px;
  box-shadow: var(--shadow-card);
  text-align: left;
}
.subscribe-card h2 { font-size: 24px; margin-bottom: 6px; }
.subscribe-card .subscribe-copy { font-size: 14.5px; color: var(--ink-muted); margin-bottom: 22px; }
.subscribe-form { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe-form input[type="email"] {
  flex-grow: 1;
  min-width: 200px;
  background: oklch(97% 0.005 260);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 15px;
  color: var(--ink);
}
.subscribe-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent-1);
}
.subscribe-form button { flex-shrink: 0; }
.subscribe-note { font-size: 12px; color: var(--ink-soft); margin: 16px 0 0; }
.substack-embed { border: none; width: 100%; height: 320px; border-radius: var(--radius-md); }

/* ---------- Generic content sections ---------- */
.page-hero {
  padding: 64px 0 16px;
  text-align: center;
}
.page-hero + .section { padding-top: 16px; }
.page-hero--animated {
  position: relative;
  overflow: hidden;
  padding: 40px 0 20px;
}
/* .hero-mesh is position:absolute; without this, the positioned mesh paints
   above the static .container regardless of DOM order and washes out the title. */
.page-hero--animated .container {
  position: relative;
  z-index: 1;
}
/* Keep the fold tight so a section's actual content is visible without scrolling. */
.page-hero--animated + .section { padding-top: 20px; }
.page-hero .eyebrow { margin-bottom: 20px; }
.page-hero h1 { font-size: clamp(32px, 4.5vw, 48px); }
.page-hero--animated .eyebrow { margin-bottom: 12px; }
.page-hero--animated h1 { margin-bottom: 0.3em; }
.page-hero .lede {
  max-width: 640px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--ink-muted);
}

/* ---------- Teaching Portfolio section pages ---------- */
.section-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-muted);
  margin: 6px 0 0;
}
.section-meta {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  margin: 12px auto 0;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------- CSS-only artifact tabs (nested tab widget inside a content-card section) ---------- */
.artifact-tabs { margin: 4px 0 24px; }
.artifact-tab-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.artifact-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 20px;
}
.artifact-tab-list label {
  display: inline-block;
  padding-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.artifact-tab-list label:hover { color: var(--ink); }
.artifact-tab-panel { display: none; }
.artifact-tab-panel > *:last-child { margin-bottom: 0; }
#c1-tab-1:checked ~ .artifact-tab-list label[for="c1-tab-1"],
#c1-tab-2:checked ~ .artifact-tab-list label[for="c1-tab-2"],
#c1-tab-3:checked ~ .artifact-tab-list label[for="c1-tab-3"],
#c1-tab-4:checked ~ .artifact-tab-list label[for="c1-tab-4"] {
  color: var(--accent-1);
  border-color: var(--accent-1);
}
#c1-tab-1:checked ~ .artifact-tab-panel[data-panel="1"],
#c1-tab-2:checked ~ .artifact-tab-panel[data-panel="2"],
#c1-tab-3:checked ~ .artifact-tab-panel[data-panel="3"],
#c1-tab-4:checked ~ .artifact-tab-panel[data-panel="4"] {
  display: block;
}

.content-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 44px 48px;
  overflow: hidden;
}
.content-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-brand);
}
/* Top-level section headings, e.g. "Description of the Competency", "Reflection" */
.content-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  margin: 48px 0 20px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--border);
}
.content-card h3::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gradient-brand);
  flex-shrink: 0;
}
.content-card > h3:first-child,
.content-card > p:first-child {
  margin-top: 0;
}

/* Sub-questions nested under a heading like "Reflection" */
.content-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin: 26px 0 12px;
  padding-left: 15px;
  border-left: 2.5px solid var(--accent-tint);
}
.content-card h3 + h4 { margin-top: 20px; }
.content-card p {
  color: var(--ink-muted);
  font-size: 15.5px;
  line-height: 1.75;
  margin: 0 0 16px;
}
.content-card ul {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 0 0 22px;
  padding: 0;
}
.content-card li {
  position: relative;
  padding-left: 24px;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.65;
}
.content-card li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-1);
}
.content-card strong { color: var(--ink); font-weight: 600; }
.content-card em { color: var(--ink); }
@media (max-width: 640px) {
  .content-card { padding: 32px 24px; }
}

.section { padding: 48px 0; }
.section-narrow { max-width: 760px; margin: 0 auto; }
.section-wide { max-width: 980px; margin: 0 auto; }
.section h2 { font-size: 28px; margin-bottom: 16px; }
.section h3 { font-size: 20px; margin-bottom: 10px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
}
.card + .card { margin-top: 20px; }

.stack { display: flex; flex-direction: column; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 780px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Competency accordion (Teaching Portfolio) ---------- */
.competency {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.competency + .competency { margin-top: 16px; }
.competency summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
}
.competency summary::-webkit-details-marker { display: none; }
.competency summary .chevron {
  flex-shrink: 0;
  transition: transform .18s ease;
  color: var(--accent-1);
}
.competency[open] summary .chevron { transform: rotate(180deg); }
.competency .competency-body {
  padding: 0 28px 28px;
  color: var(--ink-soft);
  font-size: 15px;
}
.competency .competency-body h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin: 18px 0 6px;
}
.competency .competency-body ul { padding-left: 20px; list-style: disc; }
.competency .competency-body li { margin-bottom: 6px; }
.competency .competency-meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }

/* ---------- About page ---------- */
.about-header { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.about-header .avatar-mark {
  width: 96px; height: 96px;
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 32px;
}
.about-header .avatar-photo {
  box-sizing: border-box;
  width: 96px; height: 96px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  object-fit: cover;
  padding: 3px;
  background: var(--gradient-brand);
}
.timeline-item { padding: 20px 0; border-top: 1px solid var(--border); }
.timeline-item:first-child { border-top: none; }
.timeline-item .role { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.timeline-item .org-meta { color: var(--ink-soft); font-size: 14px; margin-bottom: 10px; }
.timeline-item ul { padding-left: 20px; list-style: disc; }
.timeline-item li { margin-bottom: 6px; color: var(--ink-muted); font-size: 15px; }

/* ---------- Story timeline (About page: photo + alternating row) ---------- */
.story-timeline {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 8px 0 48px;
}
.story-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 26px 30px;
}
.story-row:nth-child(even) { background: oklch(97% 0.006 260); }
.story-thumb {
  width: 130px;
  height: 92px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.story-thumb--logo img { object-fit: contain; padding: 16px; }
.story-content p {
  margin: 0 0 8px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-muted);
}
.story-content p:last-of-type { margin-bottom: 0; }
.story-content a { color: var(--accent-1); font-weight: 600; }
.story-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-1);
}
@media (max-width: 640px) {
  .story-row { flex-direction: column; align-items: flex-start; }
  .story-thumb { width: 100%; height: 150px; }
}

.pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  background: var(--accent-tint);
  color: var(--accent-tint-ink);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
}

/* ---------- Contact page ---------- */
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color .15s ease, transform .15s ease;
}
.contact-link:hover { border-color: var(--accent-1); transform: translateY(-1px); }
.contact-link .icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent-tint-ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-link .label { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.contact-link .sub { font-size: 13px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 64px;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 13.5px; color: var(--ink-soft); }
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  transition: border-color .15s ease, color .15s ease;
}
.footer-social a:hover { border-color: var(--accent-1); color: var(--accent-1); }

/* ---------- Subscribe card variants ---------- */
.subscribe-card--compact { max-width: 560px; padding: 30px 34px; margin-top: 8px; }
.subscribe-card--compact h2 { font-size: 20px; }

/* ---------- Motion / reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes ao-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.entrance > * {
  animation: ao-fade-up .7s ease both;
}
.entrance > *:nth-child(1) { animation-delay: .03s; }
.entrance > *:nth-child(2) { animation-delay: .12s; }
.entrance > *:nth-child(3) { animation-delay: .21s; }
.entrance > *:nth-child(4) { animation-delay: .30s; }

@keyframes ao-mesh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hero-mesh--spin {
  animation: ao-mesh-spin 40s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .entrance > * { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
  .hero-mesh--spin { animation: none !important; }
}

/* ---------- Teaching Portfolio hub cards ---------- */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 900px) { .teaching-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .teaching-grid { grid-template-columns: 1fr; } }

.teaching-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.teaching-card:hover {
  border-color: var(--accent-1);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.teaching-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--accent-tint);
}
.teaching-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.teaching-card:hover .teaching-card-img img { transform: scale(1.05); }
.teaching-card-img .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  margin: 0;
  box-shadow: 0 6px 16px -4px oklch(20% 0.02 260 / 0.45);
}
.teaching-card-body { padding: 22px 24px 24px; }
.teaching-card .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--accent-tint);
  color: var(--accent-tint-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 16px;
}
.teaching-card h3 { font-size: 17px; margin-bottom: 8px; }
.teaching-card p { font-size: 14px; color: var(--ink-muted); margin: 0; }
.teaching-card .go-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--accent-1);
}
.teaching-card .go-link svg { transition: transform .15s ease; }
.teaching-card:hover .go-link svg { transform: translateX(3px); }

/* ---------- Section prev/next nav (teaching sub-pages) ---------- */
.section-pagenav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.section-pagenav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 45%;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color .15s ease, transform .15s ease;
}
.section-pagenav a:hover { border-color: var(--accent-1); transform: translateY(-2px); }
.section-pagenav .dir { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.section-pagenav .next { margin-left: auto; text-align: right; align-items: flex-end; }
.section-pagenav .label { font-family: var(--font-display); font-weight: 600; font-size: 15px; }

/* ---------- Results chart grid (Teaching Portfolio Competency 5) ---------- */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
@media (max-width: 780px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-grid figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
.chart-grid img {
  display: block;
  width: 100%;
  height: auto;
}
.chart-grid figcaption {
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  border-top: 1px solid var(--border);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
