/* AI for Research: academic, minimal styling */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1f2328;
  --muted: #5b6168;
  --rule: #e4e1da;
  --accent: #4a2c7a;
  --accent-soft: #efeaf6;
  --focus: #0e7c86;
  --measure: 46rem;
  --serif: "Source Serif 4", "Georgia", "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.9rem;
  z-index: 10;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: min(100% - 2rem, 64rem);
  margin-inline: auto;
}

.measure {
  max-width: var(--measure);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  backdrop-filter: saturate(1.2) blur(8px);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 20px -12px rgba(31, 35, 40, 0.35);
  border-color: transparent;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 4px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-nav a {
  position: relative;
  transition: color 0.2s ease;
}

.site-nav a.is-active {
  color: var(--accent);
  font-weight: 600;
}

.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  background: var(--accent);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 4rem 3rem;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  isolation: isolate;
}

/* Slow drifting glow behind the hero: decorative only */
.hero::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: -1;
  background:
    radial-gradient(closest-side at 78% 42%, rgba(74, 44, 122, 0.11), transparent 70%),
    radial-gradient(closest-side at 18% 85%, rgba(14, 124, 134, 0.08), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3%, 2%, 0) scale(1.06); }
}

.hero h1,
.hero .lede,
.hero .meta,
.hero .actions,
.hero .eyebrow {
  animation: rise 0.7s ease backwards;
}

.hero .eyebrow { animation-delay: 0.02s; }
.hero h1       { animation-delay: 0.08s; }
.hero .lede    { animation-delay: 0.16s; }
.hero .meta    { animation-delay: 0.22s; }
.hero .actions { animation-delay: 0.28s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 17rem);
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.75rem;
  margin: 0 0 1.25rem;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 40rem;
}

.meta {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
}

.button:hover {
  background: var(--accent);
  color: #fff;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: #36205c;
  border-color: #36205c;
}

.hero-logo img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--rule);
  box-shadow: 0 18px 40px -26px rgba(31, 35, 40, 0.45);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.6s ease;
  animation: logo-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.hero-logo img:hover {
  transform: rotate(-1.2deg) scale(1.02);
  box-shadow: 0 24px 50px -24px rgba(74, 44, 122, 0.5);
}

@keyframes logo-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Sections */

section.block {
  padding-block: 3.5rem;
  border-bottom: 1px solid var(--rule);
}

section.block:last-of-type {
  border-bottom: 0;
}

section.block.tinted {
  background: var(--surface);
}

.kicker {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Dates timeline */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--rule);
}

.timeline li {
  position: relative;
  padding: 0 0 1.75rem 1.75rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid #b9b2c9;
}

.timeline li.done::before {
  background: #b9b2c9;
}

.timeline li.next::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(74, 44, 122, 0.15);
}

.timeline time {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-right: 0.75rem;
}

.timeline .status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  color: var(--muted);
  background: #eeece7;
}

.timeline li.next .status {
  color: var(--accent);
  background: var(--accent-soft);
}

.timeline li.done time {
  color: var(--muted);
}

.timeline p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

/* Marketing band: purple, cream text, staggered headline (idea from Mr Watson) */

.pitch {
  position: relative;
  overflow: hidden;
  padding-block: 5rem 4.5rem;
  background: var(--accent);
  color: #fbfaf7;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pitch::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -40%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.pitch .wrap {
  position: relative;
}

.pitch .kicker {
  color: #cfc3e6;
}

.pitch-title {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.12;
  margin: 0 0 3rem;
  color: #fbfaf7;
  max-width: 22ch;
}

.pitch-word {
  display: inline-block;
  margin-right: 0.25em;
}

/* Words start hidden only when JavaScript is on, then rise in when the band scrolls into view */
.js .pitch:not(.is-visible) .pitch-word {
  opacity: 0;
}

.js .pitch.is-visible .pitch-word {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: var(--d);
}

.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pillar {
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  padding-top: 1.25rem;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.4s ease;
}

.pillar:hover {
  transform: translateY(-4px);
  border-color: #fbfaf7;
}

.pillar-num {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: #cfc3e6;
  margin-bottom: 0.6rem;
}

.pillar h3 {
  color: #fbfaf7;
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.pillar p {
  margin: 0;
  color: #e4dcf1;
  font-size: 1rem;
}

.pitch-cta {
  margin-top: 3rem;
}

.button.light {
  border-color: #fbfaf7;
  color: #fbfaf7;
}

.button.light:hover {
  background: #fbfaf7;
  color: var(--accent);
  border-color: #fbfaf7;
}

@media (max-width: 860px) {
  .pillars {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* LinkedIn */

.linkedin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 504px);
  gap: 2.5rem;
  align-items: start;
}

.linkedin-embed {
  width: 100%;
  max-width: 504px;
  height: 668px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
}

/* Contact */

.contacts {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.contact {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.35rem 1.4rem;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  align-items: center;
}

.contact img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  grid-row: span 2;
}

.contact .name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
}

.contact .email {
  font-size: 0.97rem;
  word-break: break-all;
  margin: 0;
}

/* Teachers */

.teachers {
  display: grid;
  gap: 2rem 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.teachers li {
  text-align: center;
}

.teachers img {
  width: 100%;
  max-width: 10rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--rule);
  margin: 0 auto 0.6rem;
}

.teachers .name {
  margin: 0;
  font-weight: 600;
  font-size: 0.97rem;
}

/* Reveal on scroll: only hides content when JavaScript runs */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Hover motion for cards and photos */

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -12px rgba(74, 44, 122, 0.7);
}

.contact {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.contact:hover {
  transform: translateY(-3px);
  border-color: rgba(74, 44, 122, 0.35);
  box-shadow: 0 14px 28px -22px rgba(31, 35, 40, 0.5);
}

.teachers img {
  filter: grayscale(0.35);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease, box-shadow 0.4s ease;
}

.teachers li:hover img {
  filter: grayscale(0);
  transform: translateY(-4px);
  box-shadow: 0 14px 26px -18px rgba(31, 35, 40, 0.55);
}

/* Contact form */

.lead-small {
  margin-bottom: 1.75rem;
  color: var(--muted);
}

.contact-form {
  display: grid;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.field-row {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.field label {
  font-size: 0.9rem;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fdfcfa;
  border: 1px solid #cfcbc2;
  border-radius: 3px;
  padding: 0.6rem 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 9rem;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #a9a49a;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 44, 122, 0.15);
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #a33a3a;
}

.count {
  margin: 0;
  justify-self: end;
  font-size: 0.82rem;
  color: var(--muted);
}

.captcha {
  background: var(--accent-soft);
  border: 1px solid #ddd5ec;
  border-radius: 4px;
  padding: 1rem 1.1rem;
}

.captcha-note {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.captcha-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
}

.captcha-question {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.captcha-question.is-new {
  animation: rise 0.45s ease backwards;
}

.captcha-row input {
  width: 6rem;
  font: inherit;
  font-size: 1rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid #b9b2c9;
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
}

.captcha-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 44, 122, 0.15);
}

.link-button {
  background: none;
  border: 0;
  padding: 0.25rem 0;
  font: inherit;
  font-size: 0.92rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.link-button:hover {
  color: #36205c;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.25rem;
}

.form-foot button {
  font: inherit;
  cursor: pointer;
}

.status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  min-height: 1.4em;
}

.status.is-error {
  color: #a33a3a;
}

.status.is-success {
  color: #1d6b4f;
}

.status.is-info {
  color: var(--muted);
}

/* Honeypot: hidden from people and screen readers, visible to naive bots */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Teacher name links */

.teachers .name a,
.contact .name a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 44, 122, 0.35);
}

.teachers .name a:hover,
.contact .name a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Footer */

.site-footer {
  padding-block: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  background: var(--surface);
}

.site-footer p {
  margin: 0.25rem 0;
}

/* Responsive */

@media (max-width: 860px) {
  .hero-grid,
  .linkedin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid > *,
  .linkedin-grid > * {
    min-width: 0;
  }

  .linkedin-embed {
    max-width: 100%;
  }

  .hero-logo {
    max-width: 16rem;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }

  .hero {
    padding-block: 2.5rem 2rem;
  }


  .linkedin-embed {
    height: 620px;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-foot button {
    width: 100%;
  }

  .teachers {
    gap: 1.5rem 0.9rem;
  }

  .teachers .name {
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
