:root {
  --ink: #17201d;
  --ink-soft: #33423e;
  --paper: #f7f4ed;
  --paper-deep: #ebe5d8;
  --mist: #dfe8e3;
  --teal: #0f766e;
  --teal-dark: #0d4f4a;
  --copper: #b46a3c;
  --green: #4b7b54;
  --blue: #3c6587;
  --line: rgba(23, 32, 29, 0.14);
  --shadow: 0 24px 70px rgba(19, 27, 25, 0.16);
  --radius: 8px;
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 52px);
  background: rgba(247, 244, 237, 0.92);
  border-bottom: 1px solid rgba(23, 32, 29, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  font-size: 0.92rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.brand small {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 20px);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 650;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  content: '';
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100svh - 112px);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fffdf6;
  background: #0e1514;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url('assets/research-studio-hero.png');
  background-size: cover;
  background-position: center right;
  opacity: 0.72;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(10, 15, 14, 0.95) 0%,
      rgba(10, 15, 14, 0.76) 38%,
      rgba(10, 15, 14, 0.18) 100%
    ),
    linear-gradient(0deg, rgba(10, 15, 14, 0.58), rgba(10, 15, 14, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: auto;
  margin-left: clamp(20px, 6vw, 84px);
  margin-right: clamp(20px, 4vw, 52px);
  padding: clamp(54px, 9vw, 10px) 0;
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(320px, 420px);
  justify-content: space-between;
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
}

.hero-main {
  min-width: 0;
}

.eyebrow,
.section-kicker,
.paper-type,
.problem-card span {
  margin: 0 0 14px;
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #e7bd8f;
}

h1,
h2,
h3,
p,
dd,
button {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 720px;
  font-size: 5rem;
  font-weight: 850;
}

h2 {
  max-width: 780px;
  font-size: 3.35rem;
  font-weight: 820;
}

h3 {
  font-size: 1.18rem;
  font-weight: 800;
}

.hero-copy {
  max-width: 660px;
  margin: 24px 0 0;
  color: rgba(255, 253, 246, 0.84);
  font-size: 1.24rem;
}

.research-brief {
  align-self: end;
  justify-self: end;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 253, 246, 0.18);
  border-radius: var(--radius);
  background: rgba(10, 15, 14, 0.68);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.research-brief .eyebrow {
  margin: 0;
}

.brief-header span {
  color: rgba(255, 253, 246, 0.62);
  font-size: 0.78rem;
  font-weight: 850;
}

.research-brief h2 {
  max-width: none;
  font-size: 1.48rem;
}

.research-brief p:not(.eyebrow) {
  margin: 14px 0 0;
  color: rgba(255, 253, 246, 0.78);
}

.brief-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 18px;
}

.brief-track span {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.18);
}

.brief-track span.active {
  background: #8bd6cd;
}

.brief-next {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(255, 253, 246, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 253, 246, 0.09);
  color: #fffdf6;
  cursor: pointer;
  font-weight: 850;
}

.brief-next:hover,
.brief-next:focus-visible {
  border-color: #8bd6cd;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  background: #fffdf6;
  color: var(--ink);
}

.button-secondary {
  border-color: rgba(255, 253, 246, 0.34);
  color: #fffdf6;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 560px;
  margin: 42px 0 0;
}

.hero-metrics div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 253, 246, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 253, 246, 0.08);
}

.hero-metrics dt {
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 850;
}

.hero-metrics dd {
  margin: 8px 0 0;
  color: rgba(255, 253, 246, 0.72);
  font-size: 0.88rem;
}

.section {
  padding: clamp(64px, 9vw, 112px) clamp(20px, 4vw, 52px);
}

.section-light {
  background: var(--paper-deep);
}

.section-ink {
  background: var(--ink);
  color: var(--paper);
}

.section-map {
  background: linear-gradient(
    180deg,
    rgba(223, 232, 227, 0.88),
    rgba(247, 244, 237, 0.98)
  );
}

.section-contact {
  padding-bottom: clamp(54px, 7vw, 84px);
}

.section-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.section-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 34px;
}

.section-heading h2 {
  max-width: 860px;
}

.intro-grid,
.teaching-layout,
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: start;
}

.intro-grid p:last-child,
.teaching-layout p,
.contact-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.theme-grid,
.paper-grid,
.artifact-grid,
.problem-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.paper-grid,
.artifact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-card,
.paper-card,
.artifact-card,
.problem-card,
.teaching-list article,
.map-detail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 246, 0.72);
  box-shadow: 0 12px 34px rgba(23, 32, 29, 0.07);
}

.theme-card,
.paper-card,
.artifact-card,
.problem-card,
.teaching-list article {
  padding: 22px;
}

.theme-card {
  min-height: 316px;
  display: flex;
  flex-direction: column;
}

.theme-index {
  color: var(--teal);
  font-weight: 850;
  font-size: 0.86rem;
}

.theme-card h3,
.paper-card h3,
.artifact-card h3,
.problem-card h3,
.teaching-list h3 {
  margin-top: 18px;
}

.theme-card p,
.paper-card p,
.artifact-card p,
.teaching-list p {
  color: var(--ink-soft);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: auto 0 0;
  list-style: none;
}

.tag-list li {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 750;
}

.section-ink .paper-card {
  background: rgba(255, 253, 246, 0.06);
  border-color: rgba(255, 253, 246, 0.16);
  box-shadow: none;
}

.section-ink .paper-card p {
  color: rgba(247, 244, 237, 0.74);
}

.paper-card,
.artifact-card {
  min-height: 292px;
  display: flex;
  flex-direction: column;
}

.paper-brief {
  margin: 12px 0 18px;
  border: 1px solid rgba(255, 253, 246, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 253, 246, 0.05);
}

.paper-brief summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: #8bd6cd;
  cursor: pointer;
  font-weight: 850;
}

.paper-brief summary::-webkit-details-marker {
  display: none;
}

.paper-brief summary::after {
  content: '+';
  margin-left: auto;
  color: rgba(247, 244, 237, 0.7);
  font-weight: 900;
}

.paper-brief[open] summary::after {
  content: '-';
}

.paper-brief dl {
  display: grid;
  gap: 7px 12px;
  grid-template-columns: 110px minmax(0, 1fr);
  margin: 0;
  padding: 0 12px 14px;
}

.paper-brief dt {
  color: rgba(247, 244, 237, 0.92);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.paper-brief dd {
  margin: 0;
  color: rgba(247, 244, 237, 0.72);
  font-size: 0.9rem;
}

.paper-card a,
.artifact-card a {
  margin-top: auto;
  color: var(--teal);
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.section-ink .paper-card a {
  color: #8bd6cd;
}

.map-controls,
.problem-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.map-tab,
.problem-filter,
.map-node {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.72);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.map-tab,
.problem-filter {
  min-height: 42px;
  padding: 9px 14px;
}

.map-tab.active,
.problem-filter.active,
.map-node.active {
  border-color: rgba(15, 118, 110, 0.34);
  background: var(--teal);
  color: #fffdf6;
}

.research-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(280px, 1.1fr);
  gap: 14px;
  align-items: stretch;
}

.map-column {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 360px;
  padding: 20px;
  border: 1px solid rgba(23, 32, 29, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 253, 246, 0.48);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.research-map[data-active-family='algorithms'] .map-column:nth-of-type(1),
.research-map[data-active-family='ai'] .map-column:nth-of-type(2),
.research-map[data-active-family='academic'] .map-column:nth-of-type(3) {
  border-color: rgba(15, 118, 110, 0.34);
  background: rgba(255, 253, 246, 0.76);
  transform: translateY(-2px);
}

.map-column h3 {
  margin-bottom: 10px;
  color: var(--teal-dark);
}

.map-node {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  text-align: left;
  border-radius: var(--radius);
}

.map-detail {
  min-height: 360px;
  padding: 24px;
}

.map-detail h3 {
  margin-bottom: 16px;
  font-size: 1.55rem;
}

.map-detail p:not(.section-kicker) {
  color: var(--ink-soft);
}

.map-connections {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.map-connections h4 {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.map-connections ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.map-connections li {
  padding: 9px 10px;
  border-radius: var(--radius);
  background: rgba(15, 118, 110, 0.09);
  color: var(--ink-soft);
  font-weight: 750;
}

.artifact-card {
  background: #fffdf6;
}

.teaching-list {
  display: grid;
  gap: 14px;
}

.teaching-list article {
  min-height: 142px;
  background: rgba(255, 253, 246, 0.68);
}

.problem-filters {
  margin-bottom: 24px;
}

.problem-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.problem-card {
  min-height: 168px;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.problem-card.is-hidden {
  display: none;
}

.problem-card span {
  display: block;
  margin-bottom: 16px;
}

.problem-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
  line-height: 1.28;
}

.problem-note {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.contact-card {
  padding: clamp(28px, 5vw, 48px);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
}

.contact-card p {
  color: rgba(247, 244, 237, 0.76);
}

.contact-links {
  display: grid;
  gap: 10px;
}

.contact-links a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid rgba(255, 253, 246, 0.16);
  border-radius: var(--radius);
  color: var(--paper);
  text-decoration: none;
}

.contact-links a::after {
  content: '>';
  color: #8bd6cd;
  font-weight: 900;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 4vw, 52px);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
}

.briefbot {
  position: fixed;
  right: 22px;
  bottom: 52px;
  z-index: 24;
  display: grid;
  grid-template-columns: auto minmax(190px, 260px);
  gap: 12px;
  align-items: end;
  max-width: min(420px, calc(100vw - 44px));
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.briefbot.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.briefbot.is-minimized {
  grid-template-columns: auto;
  gap: 0;
}

.briefbot.is-minimized .briefbot-close,
.briefbot.is-minimized .briefbot-bubble {
  display: none;
}

.briefbot.is-minimized .briefbot-body {
  padding: 8px;
  border: 1px solid rgba(23, 32, 29, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 253, 246, 0.94);
  box-shadow: 0 18px 44px rgba(23, 32, 29, 0.18);
}

.briefbot.is-minimized .briefbot-note {
  width: 54px;
  height: 62px;
  box-shadow: none;
}

.briefbot.is-minimized .briefbot-fold {
  width: 18px;
  height: 18px;
}

.briefbot.is-minimized .briefbot-eye {
  top: 24px;
  width: 15px;
  height: 16px;
  border-width: 2px;
}

.briefbot.is-minimized .briefbot-eye-left {
  left: 12px;
}

.briefbot.is-minimized .briefbot-eye-right {
  right: 12px;
}

.briefbot.is-minimized .briefbot-pupil {
  width: 5px;
  height: 5px;
}

.briefbot.is-minimized .briefbot-note::after {
  left: 13px;
  right: 13px;
  bottom: 12px;
}

.briefbot-close {
  position: absolute;
  top: -12px;
  right: -10px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 253, 246, 0.24);
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
}

.briefbot-body {
  display: grid;
  gap: 6px;
  justify-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.briefbot-note {
  position: relative;
  width: 76px;
  height: 86px;
  display: block;
  border: 2px solid rgba(23, 32, 29, 0.72);
  border-radius: 7px;
  background:
    linear-gradient(135deg, transparent 0 18px, rgba(255, 253, 246, 0.98) 18px),
    repeating-linear-gradient(
      180deg,
      transparent 0 16px,
      rgba(15, 118, 110, 0.1) 17px
    );
  box-shadow: 0 16px 34px rgba(23, 32, 29, 0.22);
  transform: rotate(-3deg);
}

.briefbot-fold {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  border-left: 2px solid rgba(23, 32, 29, 0.28);
  border-bottom: 2px solid rgba(23, 32, 29, 0.28);
  border-radius: 0 6px 0 4px;
  background: var(--paper-deep);
}

.briefbot-note::after {
  position: absolute;
  left: 17px;
  right: 17px;
  bottom: 18px;
  height: 3px;
  content: '';
  border-radius: 999px;
  background: rgba(180, 106, 60, 0.75);
}

.briefbot-eye {
  position: absolute;
  top: 32px;
  width: 20px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(23, 32, 29, 0.82);
  border-radius: 50%;
  background: #fffdf6;
}

.briefbot-eye-left {
  left: 17px;
}

.briefbot-eye-right {
  right: 17px;
}

.briefbot-pupil {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(var(--briefbot-eye-x, 0), var(--briefbot-eye-y, 0));
  transition: transform 80ms linear;
}

.briefbot-title {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.briefbot-bubble {
  position: relative;
  padding: 14px 15px;
  border: 1px solid rgba(23, 32, 29, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 253, 246, 0.95);
  box-shadow: 0 18px 44px rgba(23, 32, 29, 0.18);
}

.briefbot-bubble::before {
  position: absolute;
  left: -8px;
  bottom: 28px;
  width: 14px;
  height: 14px;
  content: '';
  border-left: 1px solid rgba(23, 32, 29, 0.14);
  border-bottom: 1px solid rgba(23, 32, 29, 0.14);
  background: rgba(255, 253, 246, 0.95);
  transform: rotate(45deg);
}

.briefbot-bubble p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.42;
}

.paper-page {
  background: var(--paper);
}

.paper-hero {
  padding: clamp(54px, 8vw, 92px) clamp(20px, 4vw, 52px);
  background: var(--ink);
  color: var(--paper);
}

.paper-hero-inner,
.paper-body {
  width: min(960px, 100%);
  margin: 0 auto;
}

.paper-hero a {
  display: inline-flex;
  margin-bottom: 28px;
  color: #8bd6cd;
  font-weight: 800;
}

.paper-hero h1 {
  max-width: 880px;
  font-size: 4.55rem;
}

.paper-hero p {
  max-width: 760px;
  color: rgba(247, 244, 237, 0.78);
  font-size: 1.12rem;
}

.paper-body {
  padding: clamp(42px, 7vw, 76px) 20px;
}

.journey-grid {
  display: grid;
  gap: 14px;
}

.journey-card {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf6;
}

.journey-card h2 {
  font-size: 1.42rem;
}

.journey-card p,
.journey-card li {
  color: var(--ink-soft);
}

.resource-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-row a {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal-dark);
  font-weight: 800;
}

@media (max-width: 1060px) {
  h1 {
    font-size: 4.1rem;
  }

  h2 {
    font-size: 2.85rem;
  }

  .paper-hero h1 {
    font-size: 3.85rem;
  }

  .theme-grid,
  .paper-grid,
  .artifact-grid,
  .problem-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .research-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-detail {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  h1 {
    font-size: 3.25rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  .hero-copy {
    font-size: 1.08rem;
  }

  .paper-hero h1 {
    font-size: 3.05rem;
  }

  .site-header {
    min-height: 70px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 20px 24px;
    background: rgba(247, 244, 237, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    padding: 13px 0;
  }

  .site-nav a::after {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    opacity: 0.5;
    background-position: center;
  }

  .hero-overlay {
    background: linear-gradient(
      90deg,
      rgba(10, 15, 14, 0.94),
      rgba(10, 15, 14, 0.55)
    );
  }

  .hero-content {
    width: calc(100% - 40px);
    max-width: 720px;
    margin: 0 auto;
    padding: 46px 0 34px;
    grid-template-columns: 1fr;
  }

  .hero-main,
  .research-brief,
  .hero-actions,
  .hero-metrics {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .research-brief {
    align-self: stretch;
  }

  .intro-grid,
  .teaching-layout,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .briefbot {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-content {
    width: min(350px, calc(100vw - 40px));
    max-width: min(350px, calc(100vw - 40px));
    margin-left: 20px;
    margin-right: auto;
  }

  .section-inner {
    width: min(350px, 100%);
  }

  h1 {
    font-size: 1.82rem;
    line-height: 1.14;
  }

  h2 {
    font-size: 1.95rem;
  }

  h3 {
    font-size: 1.08rem;
  }

  .paper-hero h1 {
    font-size: 2.35rem;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand small {
    display: none;
  }

  .theme-grid,
  .paper-grid,
  .artifact-grid,
  .problem-board,
  .research-map {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 24px;
  }

  .research-brief {
    padding: 18px;
    min-width: 0;
  }

  .research-brief h2 {
    font-size: 1.08rem;
    line-height: 1.18;
  }

  .paper-brief dl {
    grid-template-columns: 1fr;
  }

  .hero-metrics div {
    padding: 10px 8px;
  }

  .hero-metrics dt {
    font-size: 1.28rem;
  }

  .hero-metrics dd {
    font-size: 0.72rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .theme-card,
  .paper-card,
  .artifact-card,
  .problem-card,
  .map-column,
  .map-detail,
  .contact-card {
    min-height: auto;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .briefbot,
  .briefbot-pupil {
    transition: none;
  }
}
