/* Shared colors and fonts for the Professor website. */
:root {
  --color-paper: #f6f5ef;
  --color-sage: #dce7df;
  --color-blue: #dce8ee;
  --color-ink: #263333;
  --color-muted: #596663;
  --color-accent-text: #355348;
  --font-body: "DM Sans", Arial, sans-serif;
  --font-heading: "DM Serif Display", Georgia, serif;
}

/* Use predictable sizing and remove the browser's default page gap. */
* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  line-height: 1.6;
}

main {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
  padding-block: 2rem;
}

h1,
h2,
h3 {
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
}

a {
  color: #45685d;
}

a:focus-visible {
  outline: 3px solid #45685d;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: #fff;
  background: #244d40;
  transform: translateY(calc(-100% - 1rem));
}

.skip-link:focus {
  transform: translateY(0);
}

#main-content:focus-visible {
  outline: 3px solid #45685d;
  outline-offset: 3px;
  border-radius: 0.35rem;
}

/* Header and footer share the site's centered content width. */
.site-header,
.site-footer {
  padding-inline: max(1rem, calc((100% - 72rem) / 2));
}

.site-header {
  border-bottom: 1px solid rgba(38, 51, 51, 0.1);
  background: rgba(246, 245, 239, 0.92);
}

.header-inner {
  display: flex;
  min-height: 5.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-size: 1.6rem;
  text-decoration: none;
  white-space: nowrap;
}

.brand span,
.site-footer span {
  color: var(--color-accent-text);
}

.site-nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.1rem;
}

.site-nav a,
.footer-links a {
  color: var(--color-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.footer-links a:hover {
  color: var(--color-ink);
}

.site-nav a[aria-current="page"] {
  font-weight: 700;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid rgba(38, 51, 51, 0.1);
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  min-height: 6rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-inner p {
  margin-block: 1rem;
}

/* The opening section introduces the site and gives students two next steps. */
.hero {
  display: grid;
  min-height: 34rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  padding-block: clamp(3rem, 8vw, 7rem);
}

.hero-copy {
  max-width: none;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.5rem;
  background-color: #e4ece5;
  background-image:
    linear-gradient(90deg, rgba(246, 245, 239, 0.96) 0%, rgba(246, 245, 239, 0.9) 58%, rgba(246, 245, 239, 0.58) 100%),
    url("https://images.unsplash.com/photo-1758762606970-629682250814?auto=format&fit=crop&w=1800&q=85");
  background-position: center;
  background-size: cover;
  box-shadow: 0 1.5rem 4rem rgba(38, 51, 51, 0.07);
}

.eyebrow,
.card-label {
  color: var(--color-accent-text);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 11ch;
  margin: 1rem 0 1.25rem;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  letter-spacing: -0.045em;
}

.hero-description {
  max-width: 34rem;
  color: var(--color-muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 3.1rem;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: #45685d;
  color: #fff;
}

.button-primary:hover {
  background: #355348;
}

.button-secondary {
  border: 1px solid rgba(38, 51, 51, 0.2);
  background: #fffefa;
  color: var(--color-ink);
}

.button-secondary:hover {
  background: #f0f1eb;
}

.text-link {
  color: var(--color-ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration-color: #9aafa3;
  text-underline-offset: 0.3rem;
}

.text-link span {
  color: var(--color-accent-text);
}

.hero-note {
  margin-top: 2.5rem;
  color: #7a8580;
  font-size: 0.88rem;
}

/* A study photo and soft overlay form the visual anchor beside the hero text. */
.hero-card {
  position: relative;
  display: flex;
  min-height: 28rem;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 2rem;
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.5rem;
  background-color: #476158;
  background-image:
    linear-gradient(0deg, rgba(25, 42, 37, 0.92) 0%, rgba(25, 42, 37, 0.62) 52%, rgba(25, 42, 37, 0.08) 100%),
    url("https://images.unsplash.com/photo-1769794371055-54436b54577e?auto=format&fit=crop&w=1400&q=85");
  background-position: center;
  background-size: cover;
  color: #fff;
  box-shadow: 0 1.5rem 4rem rgba(38, 51, 51, 0.08);
}

.card-orbit {
  position: absolute;
  top: -4rem;
  right: -2.5rem;
  width: 14rem;
  height: 14rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
}

.card-orbit::before,
.card-orbit::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  content: "";
  inset: 1.25rem;
}

.card-orbit::after {
  inset: 2.5rem;
}

.card-orbit span {
  position: absolute;
  top: 3.1rem;
  left: 2.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #dce7df;
}

.card-label {
  position: relative;
  margin-top: 8.5rem;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.22);
}

.card-quote {
  position: relative;
  max-width: 18rem;
  margin: 0.8rem 0 1.5rem;
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.2;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.22);
}

.card-divider {
  width: 2.5rem;
  height: 2px;
  background: #dce7df;
}

.card-caption {
  color: #fff;
  font-size: 0.9rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.22);
}

/* The feature overview introduces three different tools. */
.feature-section {
  padding-block: 2rem clamp(3.5rem, 8vw, 6rem);
}

.section-heading {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  max-width: 17ch;
  margin: 0.65rem 0;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  letter-spacing: -0.035em;
}

.section-intro {
  max-width: 34rem;
  color: var(--color-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 17rem;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-top: 4px solid transparent;
  border-radius: 1.15rem;
  background-color: #45685d;
  color: #fff;
  box-shadow: 0 0.8rem 2rem rgba(38, 51, 51, 0.08);
}

/* This overlay darkens the lower part of each photo behind the text. */
.feature-card::before {
  position: absolute;
  z-index: 1;
  background: linear-gradient(0deg, rgba(16, 30, 30, 0.88) 0%, rgba(16, 30, 30, 0.18) 72%);
  content: "";
  inset: 0;
}

.feature-card-image {
  position: absolute;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  inset: 0;
}

.feature-card .feature-number,
.feature-card h3,
.feature-card p,
.feature-card .feature-link {
  position: relative;
  z-index: 2;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}

.feature-card .feature-number {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.feature-card h3 {
  margin: 1.4rem 0 0.25rem;
  font-size: 1.65rem;
}

.feature-card p {
  margin: 0.4rem 0 1.4rem;
  font-size: 0.95rem;
}

.feature-link {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration-color: rgba(255, 255, 255, 0.85);
  text-underline-offset: 0.25rem;
}

.feature-card-sage {
  border-top-color: #91c7d8;
}

.feature-card-blue {
  border-top-color: #80c9b0;
}

.feature-card-lilac {
  border-top-color: #e4bd83;
}

/* A simple three-step path gives students a low-pressure starting point. */
.approach-section {
  margin-bottom: clamp(3.5rem, 8vw, 6rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.5rem;
  background: #f0f1eb;
}

.approach-section .section-heading {
  max-width: 43rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.step-card {
  padding: 1.25rem 1rem;
  border-top: 1px solid rgba(38, 51, 51, 0.2);
}

.step-number {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  background: #dce7df;
  color: #45685d;
  font-size: 0.78rem;
  font-weight: 700;
}

.step-card h3 {
  margin: 1rem 0 0.35rem;
  font-size: 1.4rem;
}

.step-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* Subject cards use the local photos in the project's images folder. */
.field-section {
  margin-bottom: clamp(3.5rem, 8vw, 6rem);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.field-card {
  position: relative;
  display: flex;
  min-height: 19rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.25rem;
  background-color: #51665f;
  background-position: center;
  background-size: cover;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 1rem 2.5rem rgba(38, 51, 51, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.field-card::before {
  position: absolute;
  background: linear-gradient(180deg, rgba(19, 34, 31, 0.02) 12%, rgba(19, 34, 31, 0.82) 100%);
  content: "";
  inset: 0;
}

.field-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1.4rem 3rem rgba(38, 51, 51, 0.16);
}

.field-card > span {
  position: relative;
  z-index: 1;
}

.field-tag {
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  line-height: 1.1;
}

.field-caption {
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
}

.field-computers {
  background-image: url("../images/computers.jpg");
}

.field-labs {
  background-image: url("../images/labs.jpg");
}

.field-bcom {
  background-image: url("../images/bcom.jpg");
}

/* Reflow the page sections so they fit narrow laptop and phone screens. */
@media (max-width: 48rem) {
  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 1rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 3rem;
  }

  .hero-copy {
    padding: 1.5rem;
    background-position: 62% center;
  }

  .hero h1 {
    max-width: 12ch;
  }

  .hero-card {
    min-height: 22rem;
  }

  .feature-grid,
  .steps-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 14rem;
  }

  .approach-section {
    padding: 1.25rem;
  }

  .steps-grid {
    gap: 0.5rem;
  }

  .field-card {
    min-height: 16rem;
  }
}

@media (max-width: 40rem) {
  main {
    width: min(100% - 1.25rem, 72rem);
    padding-block: 1.25rem;
  }
}

/* A quiet closing panel gives the Home page a clear final action. */
.closing-cta {
  position: relative;
  display: flex;
  min-height: 20rem;
  align-items: center;
  overflow: hidden;
  margin-bottom: 2rem;
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 1.5rem;
  background: linear-gradient(125deg, #314b43 0%, #45685d 62%, #607c6f 100%);
  color: #fff;
}

.closing-copy {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.closing-cta .eyebrow,
.closing-cta h2,
.closing-cta p {
  color: #fff;
}

.closing-cta h2 {
  max-width: 17ch;
  margin: 0.6rem 0 0.75rem;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  letter-spacing: -0.035em;
}

.closing-cta .closing-copy > p:not(.eyebrow) {
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.84);
}

.button-light {
  background: #f6f5ef;
  color: #314b43;
}

.button-light:hover {
  background: #e5ece6;
}

.closing-text-link {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration-color: rgba(255, 255, 255, 0.65);
  text-underline-offset: 0.3rem;
}

.closing-orbit {
  position: absolute;
  top: -7rem;
  right: -3rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 50%;
}

.closing-orbit::before,
.closing-orbit::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
  inset: 2rem;
}

.closing-orbit::after {
  inset: 4rem;
}

@media (max-width: 48rem) {
  .closing-cta {
    min-height: auto;
    padding: 2rem 1.25rem;
  }
}

/* About page: photos, clear text, and subject principles. */
.about-page {
  padding-top: 3rem;
}

.about-hero {
  position: relative;
  display: grid;
  min-height: 31rem;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 4rem);
  border-radius: 1.5rem;
  background: radial-gradient(circle at 16% 12%, #fffefa 0, transparent 36%), linear-gradient(125deg, #e3ebe3 0%, #e4e9e9 58%, #e8e3eb 100%);
}

.about-hero h1 {
  max-width: 15ch;
  margin: 0.55rem 0 1rem;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
}

.about-hero-copy {
  position: relative;
  z-index: 1;
}

.about-hero-copy > p:not(.eyebrow) {
  max-width: 38rem;
  margin-bottom: 1.5rem;
  color: var(--color-muted);
}

.about-photo-collage {
  position: relative;
  min-height: 24rem;
  isolation: isolate;
}

.about-photo-collage::before {
  position: absolute;
  z-index: -1;
  top: 0.5rem;
  right: 0;
  width: 82%;
  height: 88%;
  border-radius: 48% 48% 1.3rem 1.3rem;
  background: #c3d5cc;
  content: "";
  transform: rotate(3deg);
}

.about-photo-main {
  position: absolute;
  top: 0;
  right: 1rem;
  width: 78%;
  height: 84%;
  border-radius: 48% 48% 1.3rem 1.3rem;
  object-fit: cover;
  box-shadow: 0 1.5rem 3rem rgba(38, 51, 51, 0.18);
}

.about-photo-label {
  position: absolute;
  right: 0;
  bottom: 1.2rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 999px;
  background: #fffefa;
  color: #45685d;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 0.6rem 1.5rem rgba(38, 51, 51, 0.12);
}

.about-story {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 1rem;
  margin: 1.25rem 0 4rem;
}

.about-note {
  overflow: hidden;
  padding: 0 0 2rem;
  border: 1px solid rgba(38, 51, 51, 0.1);
  border-radius: 1.25rem;
  background: #fffefa;
  box-shadow: 0 0.7rem 2.4rem rgba(38, 51, 51, 0.06);
}

.about-note-soft {
  background: #e9eff1;
}

.about-note > p,
.about-note > h2 {
  margin-right: clamp(1.25rem, 3vw, 2.5rem);
  margin-left: clamp(1.25rem, 3vw, 2.5rem);
}

.about-note > .eyebrow {
  margin-top: 1.6rem;
}

.about-note h2 {
  max-width: 18ch;
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.about-note p:last-child,
.value-card p {
  color: var(--color-muted);
}

.about-note-image {
  display: block;
  width: 100%;
  height: 12rem;
  object-fit: cover;
}

.about-note-soft .about-note-image {
  object-position: center 55%;
}

.about-values {
  margin-bottom: 4rem;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.value-card {
  position: relative;
  min-height: 13rem;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid rgba(38, 51, 51, 0.06);
  border-radius: 1.1rem;
  background: #e8e9df;
  box-shadow: 0 0.7rem 1.8rem rgba(38, 51, 51, 0.04);
}

.value-card:nth-child(2) {
  background: #e2ebed;
}

.value-card:nth-child(3) {
  background: #ece7ef;
}

.value-card > span {
  color: var(--color-accent-text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.value-card h3 {
  margin: 1.5rem 0 0.5rem;
}

.value-card::after {
  position: absolute;
  right: -2.5rem;
  bottom: -3.5rem;
  width: 8rem;
  height: 8rem;
  border: 1px solid rgba(69, 104, 93, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 1rem rgba(69, 104, 93, 0.035), 0 0 0 2rem rgba(69, 104, 93, 0.025);
  content: "";
}

.about-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem 2rem;
  border-radius: 1.1rem;
  background: #45685d;
  color: #fff;
}

.about-end p {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.45rem;
}

@media (max-width: 48rem) {
  .about-hero {
    grid-template-columns: 1fr;
  }

  .about-photo-collage {
    min-height: 20rem;
  }

  .about-story,
  .value-grid {
    grid-template-columns: 1fr;
  }

  .about-end {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.5rem;
  }
}
/* Connections page: field discovery, future search controls, and outreach reminder. */
.connections-page {
  padding-top: 3rem;
}

.connections-hero {
  display: grid;
  min-height: 27rem;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(1.5rem, 5vw, 4rem);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #e2ece5, #e6eaed 68%, #eee8ef);
}

.connections-hero h1 {
  max-width: 12ch;
  margin: 0.55rem 0 1rem;
  font-size: clamp(2.7rem, 6vw, 4.5rem);
}

.connections-hero-copy > p:not(.eyebrow) {
  max-width: 35rem;
  margin-bottom: 1.5rem;
  color: var(--color-muted);
}

.connections-hero-image {
  position: relative;
  margin: 0;
}

.connections-hero-image img {
  display: block;
  width: 100%;
  height: 20rem;
  border-radius: 48% 48% 1.25rem 1.25rem;
  object-fit: cover;
  box-shadow: 0 1.2rem 2.6rem rgba(38, 51, 51, 0.16);
}

.connections-hero-image figcaption {
  position: absolute;
  right: -0.5rem;
  bottom: 1rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: #fffefa;
  color: #45685d;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 0.5rem 1.4rem rgba(38, 51, 51, 0.12);
}

.connection-search {
  margin-block: 1.25rem 4rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.25rem;
  background: #fffefa;
  box-shadow: 0 0.7rem 2.2rem rgba(38, 51, 51, 0.05);
}

.connection-search h2 {
  margin: 0.3rem 0 1.4rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.search-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 0.65rem 1rem;
}

.search-controls label {
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.search-controls label:first-child { grid-column: 1; grid-row: 1; }
.search-controls label:nth-of-type(2) { grid-column: 2; grid-row: 1; }

.search-controls select,
.search-controls input {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(38, 51, 51, 0.18);
  border-radius: 0.7rem;
  background: #f8f8f4;
  color: var(--color-ink);
  font: inherit;
}

.search-controls select { grid-column: 1; grid-row: 2; }
.search-controls input { grid-column: 2; grid-row: 2; }
.search-controls button { grid-column: 3; grid-row: 2; white-space: nowrap; }

.search-hint {
  margin: 0.9rem 0 0;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.connection-fields {
  margin-bottom: 4rem;
}

.connection-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.connection-field-card {
  overflow: hidden;
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.2rem;
  background: #fffefa;
  box-shadow: 0 0.8rem 2.2rem rgba(38, 51, 51, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.connection-field-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1.1rem 2.5rem rgba(38, 51, 51, 0.11);
}

.connection-field-card > img {
  display: block;
  width: 100%;
  height: 12rem;
  object-fit: cover;
}

.connection-field-copy {
  padding: 1.4rem 1.5rem 1.6rem;
}

.connection-field-copy h3 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.65rem;
}

.connection-field-copy > p:not(.eyebrow) {
  min-height: 4.5rem;
  color: var(--color-muted);
}

.connection-field-copy a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration-color: rgba(69, 104, 93, 0.45);
  text-underline-offset: 0.25rem;
}

.connection-reminder {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
  padding: 1.5rem 2rem;
  border-radius: 1.2rem;
  background: #45685d;
  color: #fff;
}

.reminder-mark {
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  flex: 0 0 3.2rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #d9e5d8;
  font-size: 1.5rem;
}

.connection-reminder > div { flex: 1; }
.connection-reminder .eyebrow,
.connection-reminder h2,
.connection-reminder p:not(.eyebrow) { color: #fff; }
.connection-reminder h2 { margin: 0.15rem 0 0.3rem; font-size: 1.6rem; }
.connection-reminder p:not(.eyebrow) { margin: 0; color: rgba(255, 255, 255, 0.8); }

@media (max-width: 48rem) {
  .connections-hero { grid-template-columns: 1fr; }
  .connections-hero-image img { height: 17rem; }
  .search-controls { grid-template-columns: 1fr; }
  .search-controls label:first-child,
  .search-controls label:nth-of-type(2),
  .search-controls select,
  .search-controls input,
  .search-controls button { grid-column: 1; }
  .search-controls label:first-child { grid-row: 1; }
  .search-controls select { grid-row: 2; }
  .search-controls label:nth-of-type(2) { grid-row: 3; }
  .search-controls input { grid-row: 4; }
  .search-controls button { grid-row: 5; }
  .connection-field-grid { grid-template-columns: 1fr; }
  .connection-field-card > img { height: 15rem; }
  .connection-field-copy > p:not(.eyebrow) { min-height: 0; }
  .connection-reminder { align-items: flex-start; flex-direction: column; padding: 1.5rem; }
}

/* Research specialties make the subject-to-domain path clear. */
.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 1.1rem;
  padding: 0;
  list-style: none;
}

.research-tags li {
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(69, 104, 93, 0.18);
  border-radius: 999px;
  background: #f1f4ef;
  color: #45685d;
  font-size: 0.76rem;
}

.connection-field-card:nth-child(2) .research-tags li { background: #edf3f3; }
.connection-field-card:nth-child(3) .research-tags li { background: #f3eff5; }

/* Contact page: a welcoming form and an encouraging side note. */
.contact-page {
  padding-top: 3rem;
}

.contact-intro {
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 1.5rem;
  background: linear-gradient(115deg, #e7eee6 0%, #e4eaed 52%, #eee7ef 100%);
}

.contact-intro h1 {
  max-width: 17ch;
  margin: 0.5rem 0 0.9rem;
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
}

.contact-intro > p:not(.eyebrow) {
  max-width: 39rem;
  color: var(--color-muted);
}

.contact-scribble {
  position: absolute;
  right: 4rem;
  bottom: 2.5rem;
  color: #648575;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  transform: rotate(-8deg);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 0.7fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-form,
.contact-aside {
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.25rem;
  background: #fffefa;
  box-shadow: 0 0.8rem 2.4rem rgba(38, 51, 51, 0.06);
}

.contact-form {
  padding: clamp(1.4rem, 4vw, 2.5rem);
}

.contact-form-heading h2 {
  margin: 0.3rem 0 1.5rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-field-wide {
  grid-column: 1 / -1;
}

.contact-field label {
  color: var(--color-ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(38, 51, 51, 0.17);
  border-radius: 0.7rem;
  background: #fafaf7;
  color: var(--color-ink);
  font: inherit;
}

.contact-field textarea {
  min-height: 9rem;
  resize: vertical;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: #668274;
  outline: 3px solid rgba(102, 130, 116, 0.18);
}

.contact-form-note {
  margin: 0.85rem 0 0;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.contact-review {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #b8c9c1;
  border-radius: 0.9rem;
  background: #eef3ee;
}
.contact-review[hidden] { display: none; }
.contact-review:focus { outline: 3px solid #315d50; outline-offset: 3px; }
.contact-review h3 { margin: 0 0 0.35rem; color: var(--color-ink); }
.contact-review > p { margin: 0 0 0.9rem; color: var(--color-muted); font-size: 0.88rem; }
.contact-review dl { margin: 0; }
.contact-review dt { margin-top: 0.7rem; color: var(--color-ink); font-size: 0.82rem; font-weight: 700; }
.contact-review dd { margin: 0.15rem 0 0; color: var(--color-ink); overflow-wrap: anywhere; }
.contact-review dd:last-child { white-space: pre-wrap; }
.contact-review-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1rem; }

.contact-aside {
  align-self: start;
  padding: 1.6rem;
  background: #e9eff1;
}

.contact-aside-art {
  display: grid;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1.5rem;
  place-items: center;
  border-radius: 50%;
  background: #d1e0d7;
  color: #45685d;
  font-size: 2rem;
}

.contact-aside h2 {
  margin: 0.4rem 0 0.8rem;
  font-size: 1.8rem;
}

.contact-aside > p:not(.eyebrow) {
  margin-bottom: 1.3rem;
  color: var(--color-muted);
}

.contact-aside a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration-color: rgba(69, 104, 93, 0.45);
  text-underline-offset: 0.25rem;
}

@media (max-width: 48rem) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-scribble {
    right: 1.4rem;
    bottom: 1rem;
    font-size: 1rem;
  }
}

@media (max-width: 38rem) {
  .contact-form-grid {
    grid-template-columns: 1fr;
  }

  .contact-field-wide {
    grid-column: auto;
  }
}

/* Make the developer email easy to spot and tap. */
.developer-contact-label {
  margin-bottom: 0.25rem;
  color: var(--color-ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.developer-email {
  display: inline-block;
  margin-bottom: 1.2rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* My profile page: student details with calm campus imagery. */
.profile-page { padding-top: 3rem; }
.profile-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.75fr);
  min-height: 17rem;
  align-items: center;
  gap: 2rem;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 1.5rem;
  background: linear-gradient(120deg, #e3ece5, #e8e9e5 62%, #e7e3ee);
}
.profile-intro h1 { max-width: 15ch; margin: 0.55rem 0 0.8rem; font-size: clamp(2.4rem, 5vw, 4rem); }
.profile-intro > div:first-child > p:last-child { max-width: 38rem; color: var(--color-muted); }
.profile-intro-image {
  position: relative;
  align-self: stretch;
  min-height: 14rem;
  margin: 0;
  overflow: hidden;
  border-radius: 1.1rem;
  background: #dce7df;
}
.profile-intro-image img { display: block; width: 100%; height: 100%; min-height: 14rem; object-fit: cover; }
.profile-intro-image figcaption {
  position: absolute; right: 0.75rem; bottom: 0.75rem; left: 0.75rem;
  padding: 0.55rem 0.75rem; border-radius: 0.65rem;
  background: rgba(255, 254, 250, 0.9); color: var(--color-ink);
  font-size: 0.8rem; backdrop-filter: blur(5px);
}
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.7fr);
  align-items: start;
  gap: 1rem;
  margin-bottom: 2rem;
}
.profile-form, .profile-guide {
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.25rem;
  background: #fffefa;
  box-shadow: 0 0.8rem 2.4rem rgba(38, 51, 51, 0.06);
}
.profile-form { padding: clamp(1.4rem, 4vw, 2.5rem); }
.profile-form-heading h2 { margin: 0.3rem 0 0.45rem; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.profile-form-heading > p:last-child { margin: 0 0 1.5rem; color: var(--color-muted); }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.profile-field { display: flex; flex-direction: column; gap: 0.4rem; }
.profile-field-wide { grid-column: 1 / -1; }
.profile-field label { color: var(--color-ink); font-size: 0.88rem; font-weight: 600; }
.profile-field input, .profile-field select, .profile-field textarea {
  width: 100%; min-height: 3rem; padding: 0.75rem 0.85rem;
  border: 1px solid rgba(38, 51, 51, 0.17); border-radius: 0.7rem;
  background: #fafaf7; color: var(--color-ink); font: inherit;
}
.profile-field textarea { min-height: 8rem; resize: vertical; }
.profile-field small { color: var(--color-muted); font-size: 0.8rem; }
.profile-field input:focus, .profile-field select:focus, .profile-field textarea:focus { border-color: #668274; outline: 3px solid rgba(102, 130, 116, 0.18); }
.profile-save-note { margin: 0.85rem 0 0; color: var(--color-muted); font-size: 0.82rem; }
.profile-guide { padding: 1.6rem; background: #e9eff1; }
.profile-guide-image { display: block; width: 100%; height: 10rem; margin: 0 0 1.2rem; border-radius: 0.9rem; object-fit: cover; }
.profile-guide h2 { margin: 0.35rem 0 1rem; font-size: 1.8rem; }
.profile-guide ul { display: grid; gap: 0.75rem; margin: 0; padding-left: 1.2rem; color: var(--color-muted); }
.profile-guide li::marker { color: #668274; }
.profile-guide-note { display: flex; gap: 0.7rem; margin-block: 1.5rem; padding: 1rem; border-radius: 0.9rem; background: rgba(255, 255, 255, 0.62); }
.profile-guide-note span { color: #668274; font-size: 1.2rem; }
.profile-guide-note p { margin: 0; color: var(--color-ink); font-size: 0.9rem; }
.profile-guide > a { font-size: 0.9rem; font-weight: 600; text-decoration-color: rgba(69, 104, 93, 0.45); text-underline-offset: 0.25rem; }
.resume-heading-image { display: block; width: clamp(6rem, 12vw, 8rem); height: 5rem; flex: 0 0 auto; border: 1px solid rgba(69, 104, 93, 0.2); border-radius: 0.8rem; object-fit: cover; }
@media (max-width: 48rem) {
  .profile-intro { grid-template-columns: 1fr; }
  .profile-intro-image, .profile-intro-image img { min-height: 12rem; }
  .profile-layout { grid-template-columns: 1fr; }
}
@media (max-width: 38rem) {
  .profile-intro { padding: 1.5rem; }
  .profile-intro-image, .profile-intro-image img { min-height: 10rem; }
  .profile-fields { grid-template-columns: 1fr; }
  .profile-field-wide { grid-column: auto; }
  .resume-heading-image { width: 4.5rem; height: 3.4rem; }
}
/* Embedded resume builder keeps student background and resume drafting together. */
.resume-builder-section {
  margin-bottom: 2rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.35rem;
  background: linear-gradient(145deg, #f0eee6, #e9eeea 58%, #ece8ef);
  box-shadow: 0 0.8rem 2.4rem rgba(38, 51, 51, 0.06);
}

.resume-builder-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.resume-builder-heading h2 {
  margin: 0.3rem 0 0.45rem;
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
}

.resume-builder-heading > div > p:last-child {
  max-width: 45rem;
  margin: 0;
  color: var(--color-muted);
}

.resume-page-mark {
  display: grid;
  width: 4.5rem;
  height: 5.5rem;
  flex: 0 0 auto;
  place-content: center;
  border: 1px solid rgba(69, 104, 93, 0.25);
  border-radius: 0.5rem;
  background: rgba(255, 254, 250, 0.7);
  color: #45685d;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0.4rem 0.4rem 0 rgba(69, 104, 93, 0.09);
}

.resume-builder-form {
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid rgba(38, 51, 51, 0.07);
  border-radius: 1rem;
  background: #fffefa;
}

.resume-builder-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.resume-field-wide {
  grid-column: 1 / -1;
}

.optional-label {
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.resume-builder-note {
  margin: 0.85rem 0 0;
  color: var(--color-muted);
  font-size: 0.82rem;
}

@media (max-width: 38rem) {
  .resume-builder-heading {
    align-items: flex-start;
  }

  .resume-heading-image {
    width: 5.5rem;
    height: 4.2rem;
  }

  .resume-builder-fields {
    grid-template-columns: 1fr;
  }

  .resume-field-wide {
    grid-column: auto;
  }
}

/* Resume Builder page: a focused editor beside a quiet preview card. */
.resume-page {
  padding-top: 3rem;
}

.resume-intro {
  display: flex;
  min-height: 18rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 1.5rem;
  background: linear-gradient(125deg, #e5ece5, #e8e8e1 54%, #ebe5ee);
}

.resume-intro h1 {
  max-width: 15ch;
  margin: 0.5rem 0 0.85rem;
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
}

.resume-intro > div:first-child > p:last-child {
  max-width: 38rem;
  color: var(--color-muted);
}

.resume-intro-mark {
  display: flex;
  width: 8rem;
  height: 10rem;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.2rem;
  border: 1px solid rgba(69, 104, 93, 0.24);
  border-radius: 0.7rem;
  background: rgba(255, 254, 250, 0.6);
  box-shadow: 0.6rem 0.6rem 0 rgba(69, 104, 93, 0.08);
  transform: rotate(4deg);
}

.resume-intro-mark span {
  color: #45685d;
  font-family: var(--font-heading);
  font-size: 2rem;
}

.resume-intro-mark i {
  display: block;
  width: 100%;
  height: 0.25rem;
  border-radius: 999px;
  background: rgba(69, 104, 93, 0.22);
}

.resume-intro-mark i:last-child { width: 65%; }

.resume-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.7fr);
  align-items: start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.resume-editor,
.resume-preview {
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.25rem;
  background: #fffefa;
  box-shadow: 0 0.8rem 2.4rem rgba(38, 51, 51, 0.06);
}

.resume-editor {
  padding: clamp(1.3rem, 4vw, 2.4rem);
}

.resume-editor-heading h2 {
  margin: 0.3rem 0 1.5rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.resume-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.resume-editor-wide {
  grid-column: 1 / -1;
}

.resume-editor-fields input,
.resume-editor-fields textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(38, 51, 51, 0.17);
  border-radius: 0.7rem;
  background: #fafaf7;
  color: var(--color-ink);
  font: inherit;
}

.resume-editor-fields textarea {
  min-height: 7rem;
  resize: vertical;
}

.resume-editor-fields input:focus,
.resume-editor-fields textarea:focus {
  border-color: #668274;
  outline: 3px solid rgba(102, 130, 116, 0.18);
}

.resume-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.resume-editor-actions .text-link {
  font-size: 0.9rem;
}

.resume-editor-note {
  margin: 0.85rem 0 0;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.resume-preview {
  position: sticky;
  top: 1rem;
  padding: 1.5rem;
  background: #e9eff1;
}

.resume-preview-topline {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(38, 51, 51, 0.15);
  color: var(--color-accent-text);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.resume-preview h2 {
  margin: 1.4rem 0 0.65rem;
  font-size: 1.7rem;
}

.resume-preview > p {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.resume-preview-lines {
  display: grid;
  gap: 0.45rem;
  margin-block: 1.5rem;
}

.resume-preview-lines span {
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(69, 104, 93, 0.16);
}

.resume-preview-lines span:nth-child(2) { width: 83%; }
.resume-preview-lines span:nth-child(3) { width: 62%; }

.resume-preview-list {
  display: grid;
  gap: 0.65rem;
  padding-block: 1rem;
  border-top: 1px solid rgba(38, 51, 51, 0.12);
  border-bottom: 1px solid rgba(38, 51, 51, 0.12);
}

.resume-preview-list p {
  display: flex;
  gap: 0.65rem;
  margin: 0;
  font-size: 0.83rem;
}

.resume-preview-list span {
  color: var(--color-accent-text);
  font-weight: 700;
}

.resume-preview-tip {
  margin-bottom: 0;
  padding: 0.9rem;
  border-radius: 0.8rem;
  background: rgba(255, 254, 250, 0.65);
}

@media print {
  body { background: #fff; }
  .site-header, .site-footer, .resume-intro, .resume-editor, .resume-preview-topline { display: none !important; }
  .resume-page, .resume-workspace { width: 100%; max-width: none; margin: 0; padding: 0; }
  .resume-preview { position: static; border: 0; border-radius: 0; box-shadow: none; padding: 0; background: #fff; }
  .resume-preview-content { color: #111; font: 11pt/1.45 Arial, sans-serif; }
  .resume-preview-content h2 { margin-top: 0; font-size: 22pt; }
  .resume-preview-content h3 { margin: 1.2em 0 0.35em; border-bottom: 1px solid #999; padding-bottom: 0.2em; }
  .resume-preview-content p { margin: 0.3em 0; white-space: pre-line; }
  .resume-preview-tip { margin-top: 1.5em !important; color: #555; font-size: 9pt; }
}

@media (max-width: 48rem) {
  .resume-workspace {
    grid-template-columns: 1fr;
  }

  .resume-preview {
    position: static;
  }
}

@media (max-width: 38rem) {
  .resume-intro-mark {
    display: none;
  }

  .resume-editor-fields {
    grid-template-columns: 1fr;
  }

  .resume-editor-wide {
    grid-column: auto;
  }
}

/* Mail Sender page: a writing space with a clear daily-limit reminder. */
.mail-page {
  padding-top: 3rem;
}

.mail-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.42fr);
  align-items: center;
  gap: 2rem;
  margin-bottom: 1rem;
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 1.5rem;
  background: linear-gradient(120deg, #e5ece5 0%, #e8eaeb 58%, #eee8ef 100%);
}

.mail-intro h1 {
  max-width: 14ch;
  margin: 0.5rem 0 0.85rem;
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
}

.mail-intro > div > p:last-child {
  max-width: 40rem;
  color: var(--color-muted);
}

.daily-limit {
  padding: 1.4rem;
  border: 1px solid rgba(69, 104, 93, 0.15);
  border-radius: 1rem;
  background: rgba(255, 254, 250, 0.75);
  box-shadow: 0 0.6rem 1.8rem rgba(38, 51, 51, 0.05);
}

.daily-limit .eyebrow { margin-bottom: 0.2rem; }
.daily-limit > p:last-of-type { margin: 0.1rem 0 0.85rem; color: var(--color-muted); font-size: 0.85rem; }
.daily-limit > a { font-weight: 700; text-underline-offset: 0.2rem; }

.limit-count {
  margin: 0;
  color: #45685d;
  font-size: 1.7rem;
  font-weight: 700;
}

.limit-count > span:first-child {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 400;
}

.limit-divider {
  color: #9aa8a2;
  font-weight: 400;
}

.limit-dots {
  display: flex;
  gap: 0.35rem;
}

.limit-dots i {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #d9e4dc;
}

.mail-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.7fr);
  align-items: start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.mail-form,
.mail-guide {
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.25rem;
  background: #fffefa;
  box-shadow: 0 0.8rem 2.4rem rgba(38, 51, 51, 0.06);
}

.mail-form {
  padding: clamp(1.3rem, 4vw, 2.4rem);
}

.mail-form-heading h2 {
  margin: 0.3rem 0 1.5rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.mail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.mail-field-wide { grid-column: 1 / -1; }

.mail-fields input,
.mail-fields textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(38, 51, 51, 0.17);
  border-radius: 0.7rem;
  background: #fafaf7;
  color: var(--color-ink);
  font: inherit;
}

.mail-fields textarea {
  min-height: 13rem;
  resize: vertical;
}

.mail-fields input:focus,
.mail-fields textarea:focus {
  border-color: #668274;
  outline: 3px solid rgba(102, 130, 116, 0.18);
}

.mail-fields small {
  color: var(--color-muted);
  font-size: 0.8rem;
}

.mail-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.mail-form-actions a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration-color: rgba(69, 104, 93, 0.45);
  text-underline-offset: 0.25rem;
}

.mail-draft-note {
  margin: 0.85rem 0 0;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.mail-guide {
  padding: 1.6rem;
  background: #e9eff1;
}

.mail-guide-mark {
  display: grid;
  width: 3.7rem;
  height: 3.7rem;
  margin-bottom: 1.2rem;
  place-items: center;
  border: 1px solid rgba(69, 104, 93, 0.18);
  border-radius: 50%;
  background: #d8e5dd;
  color: #45685d;
  font-size: 1.6rem;
}

.mail-guide h2 {
  margin: 0.3rem 0 1rem;
  font-size: 1.8rem;
}

.mail-guide ul {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--color-muted);
}

.mail-guide li::marker { color: #668274; }

.mail-kindness-note {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 0.8rem;
  background: rgba(255, 254, 250, 0.66);
  color: #45685d;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

@media (max-width: 48rem) {
  .mail-intro,
  .mail-workspace {
    grid-template-columns: 1fr;
  }

  .mail-intro { gap: 1.2rem; }
}

@media (max-width: 38rem) {
  .mail-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Sent & Replied page: message history sections with clear empty states. */
.messages-page {
  padding-top: 3rem;
}

.messages-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1rem;
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 1.5rem;
  background: linear-gradient(120deg, #e5ece5, #e8e8e4 55%, #e9e4ee);
}

.messages-intro h1 {
  max-width: 15ch;
  margin: 0.5rem 0 0.8rem;
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
}

.messages-intro > div:first-child > p:last-child {
  max-width: 36rem;
  color: var(--color-muted);
}

.message-summary {
  display: flex;
  min-width: 13rem;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(69, 104, 93, 0.15);
  border-radius: 1rem;
  background: rgba(255, 254, 250, 0.7);
}

.message-summary > div {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
}

.message-summary > div > span {
  color: #45685d;
  font-family: var(--font-heading);
  font-size: 2.3rem;
  line-height: 1;
}

.message-summary small {
  color: var(--color-muted);
  font-size: 0.8rem;
}

.message-summary > i {
  width: 1px;
  height: 2.2rem;
  background: rgba(38, 51, 51, 0.16);
}

.message-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-block: 1.2rem;
  padding: 0.4rem;
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 0.9rem;
  background: #fffefa;
}

.message-tabs a {
  display: inline-flex;
  min-height: 2.7rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.6rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.message-tabs a[aria-current="location"] {
  background: #e6eee7;
  color: #45685d;
}

.message-tabs a > span {
  display: inline-grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(69, 104, 93, 0.1);
  font-size: 0.72rem;
}

.message-tabs .compose-link {
  margin-left: auto;
  color: #45685d;
}

.message-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.message-list-panel {
  overflow: hidden;
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.2rem;
  background: #fffefa;
  box-shadow: 0 0.8rem 2.4rem rgba(38, 51, 51, 0.05);
}

.message-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.5rem;
  border-bottom: 1px solid rgba(38, 51, 51, 0.08);
}

.message-list-heading .eyebrow { margin-bottom: 0.15rem; }
.message-list-heading h2 { margin: 0; font-size: 1.65rem; }

.message-count {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: #e6eee7;
  color: #45685d;
  font-size: 0.8rem;
  font-weight: 700;
}

.replies-panel .message-count { background: #eee8f0; color: #6e5e7c; }

.message-empty-state {
  display: flex;
  min-height: 19rem;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.message-empty-state h3 {
  margin: 0.7rem 0 0.4rem;
  font-size: 1.35rem;
}

.message-empty-state > p {
  max-width: 22rem;
  margin: 0 0 1.1rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.empty-envelope,
.empty-speech {
  position: relative;
  display: grid;
  width: 3.6rem;
  height: 3.2rem;
  place-items: center;
  border: 1px solid rgba(69, 104, 93, 0.22);
  border-radius: 0.8rem;
  background: #e6eee7;
}

.empty-envelope::before {
  position: absolute;
  top: 0.5rem;
  width: 1.8rem;
  height: 1.3rem;
  border-right: 1px solid #668274;
  border-bottom: 1px solid #668274;
  content: "";
  transform: rotate(45deg) skew(-12deg, -12deg);
}

.empty-speech {
  border-radius: 50%;
  background: #eee8f0;
}

.empty-speech::before {
  position: absolute;
  bottom: -0.25rem;
  left: 0.55rem;
  width: 0.7rem;
  height: 0.7rem;
  border-left: 1px solid #83708f;
  background: #eee8f0;
  content: "";
  transform: skew(-20deg) rotate(-25deg);
}

.empty-speech span::before,
.empty-speech span::after,
.empty-speech span {
  display: block;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 50%;
  background: #83708f;
}

.empty-speech span {
  position: relative;
}

.empty-speech span::before,
.empty-speech span::after {
  position: absolute;
  top: 0;
  content: "";
}

.empty-speech span::before { left: -0.45rem; }
.empty-speech span::after { left: 0.45rem; }

.message-text-link {
  color: #45685d;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration-color: rgba(69, 104, 93, 0.45);
  text-underline-offset: 0.25rem;
}

.messages-draft-note {
  margin: 1rem 0 2rem;
  color: var(--color-muted);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 48rem) {
  .messages-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .message-lists {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 38rem) {
  .message-tabs {
    flex-wrap: wrap;
  }

  .message-tabs .compose-link {
    width: 100%;
    margin-left: 0;
  }
}

/* A compact toggle keeps the full page navigation usable on phones. */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(38, 51, 51, 0.18);
  border-radius: 999px;
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  cursor: pointer;
}

.menu-toggle:focus-visible {
  outline: 3px solid #45685d;
  outline-offset: 3px;
}

.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.menu-toggle-icon {
  position: relative;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-toggle-icon::before { top: -0.35rem; }
.menu-toggle-icon::after { top: 0.35rem; }

@media (max-width: 48rem) {
  .header-inner {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .menu-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    padding: 0.25rem 0 0.75rem;
  }

  .site-nav.is-open { display: flex; }

  .site-nav a { padding: 0.55rem 0.2rem; }

  .header-inner.is-menu-open {
    flex-wrap: wrap;
  }
}

/* Keep the Connections filter feedback easy to notice. */
.search-result-status {
  margin: 0.85rem 0 0;
  color: #45685d;
  font-size: 0.9rem;
  font-weight: 600;
}

.connection-field-card[hidden] {
  display: none;
}

/* A clean resume layout for the generated on-page preview. */
.resume-preview-content h2 {
  margin: 1.15rem 0 0.25rem;
  overflow-wrap: anywhere;
}

.resume-preview-content .resume-heading-line {
  margin: 0 0 1rem;
  color: var(--color-accent-text);
  font-weight: 600;
}

.resume-preview-content .resume-contact-line {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.resume-preview-content h3 {
  margin: 1.25rem 0 0.35rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(38, 51, 51, 0.12);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resume-preview-content p {
  margin: 0.25rem 0;
  color: #4d5b58;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.resume-preview-content .resume-preview-tip { margin-top: 1rem; }

/* A quiet split layout gives the sign-in page a welcoming, focused feel. */
.login-page { padding-block: clamp(2rem, 6vw, 5rem); }

.login-layout {
  display: grid;
  max-width: 62rem;
  min-height: 34rem;
  grid-template-columns: 1fr minmax(19rem, 0.88fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  margin-inline: auto;
}

.login-welcome h1 {
  margin: 0.5rem 0 0.9rem;
  font-size: clamp(3rem, 6vw, 5rem);
  letter-spacing: -0.04em;
}

.login-welcome > p:not(.eyebrow) {
  max-width: 27rem;
  color: var(--color-muted);
  font-size: 1.08rem;
}

.login-note-card {
  display: flex;
  max-width: 24rem;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 2rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1rem;
  background: #e8eee8;
  color: #45685d;
}

.login-note-card span { font-size: 1.2rem; }
.login-note-card p { margin: 0; }

.login-form {
  display: grid;
  gap: 1rem;
  padding: clamp(1.4rem, 4vw, 2.3rem);
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.25rem;
  background: #fffefa;
  box-shadow: 0 1.5rem 4rem rgba(38, 51, 51, 0.07);
}

.login-form h2 { margin: -0.75rem 0 0; font-size: 2rem; }
.login-form-intro { margin: -0.5rem 0 0.3rem; color: var(--color-muted); }
.login-form .profile-field { margin: 0; }
.login-form input { width: 100%; }

.login-submit {
  width: 100%;
  border: 0;
  font: inherit;
  cursor: not-allowed;
  opacity: 0.62;
}

.login-service-note,
.login-contact-note {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.login-contact-note { padding-top: 0.2rem; }

@media (max-width: 48rem) {
  .login-layout { min-height: auto; grid-template-columns: 1fr; }
  .login-welcome h1 { font-size: clamp(2.8rem, 12vw, 4rem); }
}

/* The reviewed draft stays visibly separate from the form. */
.mail-review[hidden] { display: none; }

.mail-review {
  margin-top: 1.25rem;
  padding: 1.2rem;
  border: 1px solid rgba(69, 104, 93, 0.22);
  border-radius: 1rem;
  background: #f4f7f2;
}

.mail-review:focus-visible {
  outline: 3px solid #45685d;
  outline-offset: 3px;
}

.mail-review h3 { margin: 0 0 0.4rem; font-size: 1.35rem; overflow-wrap: anywhere; }
.mail-review-recipient { margin: 0; color: var(--color-muted); font-size: 0.86rem; overflow-wrap: anywhere; }
.mail-review-body { margin: 1rem 0 0; white-space: pre-line; overflow-wrap: anywhere; }

.contact-form-note[aria-live="polite"] { min-height: 1.5em; }

/* Reveal selected Home cards with a small fade and lift. */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-grid [data-reveal]:nth-child(2),
.steps-grid [data-reveal]:nth-child(2),
.field-grid [data-reveal]:nth-child(2) { transition-delay: 80ms; }

.feature-grid [data-reveal]:nth-child(3),
.steps-grid [data-reveal]:nth-child(3),
.field-grid [data-reveal]:nth-child(3) { transition-delay: 150ms; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}


/* Put a direct Sign in link beside Menu on phone-sized screens. */
.header-signin {
  display: none;
  min-height: 2.8rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(69, 104, 93, 0.2);
  border-radius: 999px;
  color: #45685d;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.header-signin:focus-visible {
  outline: 3px solid #45685d;
  outline-offset: 3px;
}

@media (max-width: 48rem) {
  .header-signin { display: inline-flex; margin-left: auto; }
  .menu-toggle { margin-left: 0.65rem; }
}

/* Keep the anti-spam field off screen and out of keyboard navigation. */
.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* A clear Google option keeps the account step simple and familiar. */
.google-signin-button {
  display: inline-flex;
  width: 100%;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  border: 1px solid #d7ddd7;
  border-radius: 0.75rem;
  background: #fff;
  color: #263333;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.google-signin-button:hover:not(:disabled) {
  border-color: #a8b8ad;
  background: #f7f8f5;
  transform: translateY(-1px);
}

.google-signin-button:focus-visible,
.login-signout-button:focus-visible {
  outline: 3px solid #729487;
  outline-offset: 3px;
}

.google-signin-button:disabled,
.login-signout-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.google-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
}

.login-account-panel {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem;
  border-radius: 0.75rem;
  background: #e8eee8;
}

.login-account-panel[hidden] { display: none; }
.login-account-message { margin: 0; color: #45685d; }

.login-signout-button {
  justify-self: start;
  padding: 0.4rem 0.7rem;
  border: 1px solid #a8b8ad;
  border-radius: 0.55rem;
  background: transparent;
  color: #263333;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Email login sits below Google as a quieter second option. */
.login-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--color-muted);
  font-size: 0.78rem;
}

.login-divider::before,
.login-divider::after {
  height: 1px;
  flex: 1;
  background: #e2e5df;
  content: "";
}

.email-signin-form {
  display: grid;
  gap: 0.85rem;
}

.email-signin-form .profile-field { margin: 0; }
.email-signin-form input { width: 100%; }

.email-submit-button {
  width: 100%;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.login-email-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.login-text-button {
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
  color: #45685d;
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.login-text-button:hover { color: #263333; }

.login-text-button:focus-visible {
  outline: 2px solid #729487;
  outline-offset: 3px;
}

/* Live researcher cards built from academic publication records. */
.live-research-results {
  margin: 0 0 4rem;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border: 1px solid rgba(38, 51, 51, 0.08);
  border-radius: 1.25rem;
  background: #eaf0ee;
}
.live-research-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.live-research-card {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid rgba(38, 51, 51, 0.09);
  border-radius: 1rem;
  background: #fffefa;
  box-shadow: 0 0.6rem 1.8rem rgba(38, 51, 51, 0.05);
}
.live-research-card h3 { margin: 0 0 0.35rem; font-size: 1.25rem; }
.live-research-affiliation, .live-research-note { color: var(--color-muted); font-size: 0.88rem; }
.live-research-note { margin: 0.4rem 0 0.8rem; font-size: 0.78rem; }
.live-research-card > a, .live-paper-list a { text-underline-offset: 0.2rem; }
.live-research-card > a { font-size: 0.88rem; font-weight: 600; }
.researcher-verification { margin-top: 0.8rem; padding: 0.7rem; border: 1px solid rgba(38, 51, 51, 0.12); border-radius: 0.75rem; background: #f5f7f3; }
.researcher-verification summary { color: #36584b; cursor: pointer; font-size: 0.86rem; font-weight: 700; }
.researcher-verification-help, .researcher-verification-status { color: var(--color-muted); font-size: 0.78rem; }
.researcher-verification-form { display: grid; gap: 0.65rem; }
.researcher-verification-form label { display: grid; gap: 0.35rem; font-size: 0.8rem; }
.researcher-verification-form label:has(input[type="checkbox"]) { grid-template-columns: auto 1fr; align-items: start; }
.researcher-verification-form input[type="url"] { width: 100%; min-width: 0; padding: 0.6rem; border: 1px solid rgba(38, 51, 51, 0.2); border-radius: 0.5rem; font: inherit; font-size: 0.8rem; }
.researcher-check-button, .researcher-clear-check-button { justify-self: start; padding: 0.5rem 0.7rem; border: 1px solid rgba(69, 104, 93, 0.3); border-radius: 0.55rem; background: #fffefa; color: #36584b; cursor: pointer; font: inherit; font-size: 0.8rem; font-weight: 700; }
.researcher-verification-form :focus-visible, .researcher-clear-check-button:focus-visible { outline: 3px solid #668274; outline-offset: 2px; }
.live-paper-label { margin: 1rem 0 0.35rem; color: var(--color-ink); font-size: 0.86rem; font-weight: 700; }
.live-paper-list { margin: 0; padding-left: 1.1rem; color: var(--color-muted); font-size: 0.83rem; }
.live-paper-list li + li { margin-top: 0.45rem; }
.live-research-source { margin: 1rem 0 0; color: var(--color-muted); font-size: 0.8rem; }
.live-research-source a { color: var(--color-ink); }
@media (max-width: 48rem) { .live-research-grid { grid-template-columns: 1fr; } }

.live-email-label { margin: 1rem 0 0.2rem; color: #8b5934; font-size: 0.8rem; font-weight: 700; }
.live-email-guess { margin: 0 0 0.45rem; color: var(--color-ink); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.85rem; overflow-wrap: anywhere; }
.live-research-card > .live-draft-link { display: inline-block; margin: 0.35rem 0 0.5rem; padding: 0.65rem 0.85rem; border: 1px solid rgba(69, 104, 93, 0.24); border-radius: 0.65rem; background: #f0f5f1; color: #36584b; font-size: 0.85rem; font-weight: 700; text-decoration: none; text-underline-offset: 0.2rem; }
.live-research-card > .live-draft-link:hover { background: #dfeae2; text-decoration: underline; }
.live-research-card > .live-draft-link:focus-visible { outline: 3px solid #668274; outline-offset: 2px; }

/* Clickable research topic ideas adapt to the chosen field. */
.topic-suggestions { margin-top: 1.1rem; }
.topic-suggestions-label { margin: 0 0 0.55rem; color: var(--color-ink); font-size: 0.88rem; font-weight: 700; }
.topic-suggestions-label span { margin-left: 0.45rem; color: var(--color-muted); font-size: 0.8rem; font-weight: 400; }
.topic-suggestion-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.topic-suggestion-chip {
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(69, 104, 93, 0.2);
  border-radius: 999px;
  background: #f1f4ef;
  color: #45685d;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.topic-suggestion-chip:hover { background: #e2ebe2; transform: translateY(-1px); }
.topic-suggestion-chip:focus-visible { outline: 3px solid #45685d; outline-offset: 2px; }

/* Online researcher photos use their Commons source credit; initials cover missing matches. */
.researcher-portrait {
  position: relative;
  display: grid;
  overflow: hidden;
  height: 10.5rem;
  margin: -1.25rem -1.25rem 1rem;
  place-items: center;
  background: linear-gradient(135deg, #dce8df, #e6e0ec 55%, #dce8eb);
}
.researcher-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.researcher-portrait img[hidden] { display: none; }
.researcher-portrait-initials {
  display: grid;
  width: 5rem;
  height: 5rem;
  place-items: center;
  border: 1px solid rgba(69, 104, 93, 0.2);
  border-radius: 50%;
  background: rgba(255, 254, 250, 0.82);
  color: #45685d;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.65rem;
}
.researcher-portrait-initials[hidden] { display: none; }
.researcher-portrait-caption {
  position: absolute;
  right: 0.55rem;
  bottom: 0.5rem;
  max-width: calc(100% - 1.1rem);
  overflow: hidden;
  padding: 0.28rem 0.5rem;
  border-radius: 0.45rem;
  background: rgba(255, 254, 250, 0.94);
  color: #40574e;
  font-size: 0.65rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.researcher-portrait-caption a { color: inherit; font-weight: 700; }
.researcher-portrait-caption { white-space: normal; max-height: 2.6rem; overflow: auto; }

/* Personal message purpose and editable draft options. */
.mail-fields select {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(38, 51, 51, 0.17);
  border-radius: 0.7rem;
  background: #fafaf7;
  color: var(--color-ink);
  font: inherit;
}
.mail-fields select:focus { border-color: #668274; outline: 3px solid rgba(102, 130, 116, 0.18); }
.mail-personalize-actions { margin: 0.4rem 0 1rem; }
.mail-personalize-actions p { margin: 0.65rem 0 0; color: var(--color-muted); font-size: 0.82rem; }
.mail-draft-options[hidden] { display: none; }
.mail-draft-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 1rem 0 1.4rem; }
.mail-draft-option { min-width: 0; padding: 1rem; border: 1px solid rgba(69, 104, 93, 0.18); border-radius: 0.9rem; background: #f4f7f2; }
.ai-mail-draft-option { grid-column: 1 / -1; }
.mail-draft-option h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.mail-draft-option-subject { margin: 0 0 0.6rem; color: var(--color-ink); font-size: 0.82rem; font-weight: 700; overflow-wrap: anywhere; }
.mail-draft-option-preview { max-height: 11rem; overflow: auto; color: var(--color-muted); font-size: 0.78rem; line-height: 1.55; white-space: pre-line; }
.mail-draft-option .button { min-height: 2.5rem; padding: 0.55rem 0.8rem; font-size: 0.82rem; }
@media (max-width: 48rem) { .mail-draft-options { grid-template-columns: 1fr; } }


.load-more-researchers { display: block; margin: 1.25rem auto; }
.load-more-researchers[hidden] { display: none; }

.mail-send-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 1rem 0; padding: 1rem; border: 1px solid rgba(69, 104, 93, 0.18); border-radius: 0.85rem; background: #f1f5f1; }
.mail-send-actions[hidden] { display: none; }
.mail-send-actions p { flex-basis: 100%; margin: 0; color: var(--color-muted); font-size: 0.82rem; }
.mail-send-actions button:disabled {
  transform: none;
  border: 1px solid rgba(38, 51, 51, 0.22);
  background: #e4ece5;
  color: var(--color-ink);
  cursor: not-allowed;
}
.researcher-sent-badge { display: inline-block; margin: 0 0 0.65rem; padding: 0.3rem 0.55rem; border-radius: 999px; background: #e2f0e5; color: #285d3e; font-size: 0.75rem; font-weight: 700; }
.sent-history-list { display: grid; gap: 0.8rem; margin: 1rem 0; }
.sent-history-list:empty { display: none; }
.sent-history-card { padding: 1rem; border: 1px solid rgba(69, 104, 93, 0.16); border-radius: 0.8rem; background: #fffefa; }
.sent-history-card h3 { margin: 0 0 0.35rem; }
.sent-history-card p { margin: 0.25rem 0; color: var(--color-muted); overflow-wrap: anywhere; }
.sent-history-card time { display: block; margin-top: 0.5rem; color: var(--color-muted); font-size: 0.8rem; }
.provider-delivery-note { margin: 0; color: var(--color-muted); font-size: 0.82rem; }
.provider-delivery-status { display: inline-block; margin-top: 0.65rem !important; padding: 0.25rem 0.55rem; border-radius: 999px; background: #edf1ef; color: #40534b !important; font-size: 0.78rem; font-weight: 700; }
.provider-delivery-status.status-delivered { background: #e2f1e8; color: #225a3d !important; }
.provider-delivery-status.status-bounced, .provider-delivery-status.status-failed, .provider-delivery-status.status-complained { background: #fbe8e4; color: #8d3025 !important; }
.provider-delivery-status.status-delayed { background: #fff1d6; color: #765012 !important; }
.provider-delivery-status.status-uncertain { background: #fff1d6; color: #765012 !important; }
.provider-delivery-status.status-not_sent { background: #edf1ef; color: #40534b !important; }
.provider-recovery-note { margin-top: 0.45rem !important; font-size: 0.82rem; }
.provider-resolve-button { margin-top: 0.35rem; }
.sent-history-status { color: var(--color-muted); font-size: 0.82rem; }

.message-empty-state[hidden] { display: none; }

/* Official opportunity cards have a warmer tint to distinguish them from live researcher records. */
.opportunities-section {
  margin: 3rem 0;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid rgba(69, 104, 93, 0.12);
  border-radius: 1.5rem;
  background: #f0f0e8;
}
.opportunities-section .section-heading { margin-bottom: 1.35rem; }
.opportunity-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 0.7rem;
  margin: 1.25rem 0 0.55rem;
  padding: 1rem;
  border: 1px solid rgba(69, 104, 93, 0.15);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.68);
}
.opportunity-filters label { display: block; margin-bottom: -0.55rem; color: var(--color-muted); font-size: 0.78rem; font-weight: 700; }
.opportunity-filters select {
  width: 100%; min-height: 2.8rem; padding: 0.55rem 2rem 0.55rem 0.7rem;
  border: 1px solid rgba(38, 51, 51, 0.2); border-radius: 0.65rem;
  background: #fffefa; color: var(--color-ink); font: inherit;
}
.opportunity-filters select:focus-visible, .opportunity-filters button:focus-visible { outline: 3px solid #668274; outline-offset: 2px; }
.opportunity-count { min-height: 1.4rem; margin: 0.45rem 0 0.85rem; color: var(--color-muted); font-size: 0.83rem; }
.opportunity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.opportunity-card {
  display: flex; flex-direction: column; align-items: flex-start;
  min-height: 22rem; padding: 1.3rem; border: 1px solid rgba(69, 104, 93, 0.15);
  border-radius: 1.05rem; background: #fffefa; box-shadow: 0 8px 24px rgba(38, 51, 51, 0.04);
}
.opportunity-card-sage { background: #e7eee8; }
.opportunity-card-blue { background: #e6eef1; }
.opportunity-card-lilac { background: #eee9f0; }
.opportunity-card h3 { margin: 0.15rem 0 0.55rem; font-size: 1.35rem; }
.opportunity-card > p:not(.opportunity-kicker) { margin: 0 0 0.6rem; color: #526160; }
.opportunity-kicker { margin: 0 0 0.4rem; color: #537266; font-size: 0.73rem; font-weight: 700; letter-spacing: 0.045em; text-transform: uppercase; }
.opportunity-meta { display: grid; gap: 0.3rem; margin: 0.35rem 0 1rem; padding-left: 1.1rem; color: #526160; font-size: 0.82rem; }
.opportunity-card > a { margin-top: auto; font-size: 0.88rem; font-weight: 700; text-underline-offset: 0.2rem; }
.opportunity-card[hidden] { display: none; }
.opportunity-disclaimer { margin: 1rem 0 0; color: var(--color-muted); font-size: 0.78rem; }
@media (max-width: 48rem) {
  .opportunity-filters { grid-template-columns: 1fr; gap: 0.4rem; }
  .opportunity-filters label { margin: 0.25rem 0 -0.2rem; }
  .opportunity-grid { grid-template-columns: 1fr; }
  .opportunity-card { min-height: 0; }
}

/* Address verification is a clear, keyboard-friendly step before external email is opened. */
.email-verification-field { padding: 0.85rem 1rem; border: 1px solid rgba(69, 104, 93, 0.2); border-radius: 0.8rem; background: #f0f5f1; }
.email-verification-label { display: flex; align-items: flex-start; gap: 0.6rem; color: var(--color-ink); font-weight: 600; line-height: 1.45; }
.email-verification-label input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: 0.15rem 0 0; accent-color: #45685d; }
.email-verification-field small { display: block; margin: 0.45rem 0 0 1.7rem; color: var(--color-muted); }

/* Student interest suggestions and affiliation filtering support a more personal search. */
.profile-interest-suggestions {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(69, 104, 93, 0.16);
  border-radius: 0.85rem;
  background: rgba(220, 231, 223, 0.48);
}
.profile-interest-suggestions > a { display: inline-block; margin-top: 0.45rem; font-size: 0.82rem; font-weight: 600; }
.profile-interest-chip { border-color: rgba(69, 104, 93, 0.25); }
.researcher-filter-row {
  display: grid;
  grid-template-columns: minmax(12rem, 0.55fr) minmax(15rem, 1fr);
  align-items: center;
  gap: 0.45rem 0.8rem;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(69, 104, 93, 0.15);
  border-radius: 0.85rem;
  background: #edf2ef;
}
.researcher-filter-row label { font-size: 0.86rem; font-weight: 700; }
.researcher-filter-row input { min-height: 2.8rem; padding: 0.55rem 0.75rem; border: 1px solid rgba(38, 51, 51, 0.2); border-radius: 0.65rem; background: #fffefa; color: var(--color-ink); font: inherit; }
.researcher-filter-row input:focus-visible { outline: 3px solid #668274; outline-offset: 2px; }
.researcher-filter-row p { grid-column: 2; margin: 0; color: var(--color-muted); font-size: 0.78rem; }
.live-research-card[hidden] { display: none; }
.live-research-fit { margin: 0.7rem 0; padding: 0.65rem 0.75rem; border-left: 3px solid #789486; border-radius: 0 0.55rem 0.55rem 0; background: #f0f5f1; color: #405750; font-size: 0.8rem; }
@media (max-width: 48rem) {
  .researcher-filter-row { grid-template-columns: 1fr; }
  .researcher-filter-row p { grid-column: auto; }
}

/* A clear support route stays close to the sign-in controls. */
.login-support-card {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #d7e2dc;
  border-radius: 0.9rem;
  background: #eef3ee;
}
.login-support-card .eyebrow,
.login-support-card h3,
.login-support-card > p:not(.eyebrow) { margin: 0; }
.login-support-card h3 { color: #263333; font-size: 1.12rem; }
.login-support-card > p:not(.eyebrow) { color: var(--color-muted); font-size: 0.88rem; }
.login-support-card a { width: fit-content; color: #315d50; font-weight: 700; text-underline-offset: 0.18em; }
.login-support-card a:focus-visible { outline: 3px solid #315d50; outline-offset: 3px; border-radius: 0.2rem; }

/* Added discovery, onboarding, outreach, resume sync, and privacy details. */
.first-visit-guide, .saved-researchers-panel { margin: 1.5rem auto; max-width: 72rem; padding: 1.35rem 1.5rem; border: 1px solid rgba(69,104,93,.2); border-radius: 1rem; background: #f4f4ec; }
.first-visit-guide { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.first-visit-guide[hidden], .saved-researchers-panel[hidden] { display: none; }
.first-visit-guide h2, .saved-researchers-panel h3 { margin: .25rem 0 .7rem; }
.first-visit-guide ol { padding-left: 1.35rem; }
.first-visit-guide li { margin: .35rem 0; }
.researcher-save-button, .researcher-check-button { margin: .4rem .5rem .4rem 0; padding: .55rem .8rem; border: 1px solid #42685d; border-radius: 999px; color: #23483e; background: #fff; cursor: pointer; font: inherit; }
.researcher-save-button[aria-pressed="true"], .researcher-check-button[aria-pressed="true"] { background: #e0ece6; }
.saved-researchers-panel #saved-researchers-list { display: flex; flex-wrap: wrap; gap: .65rem; }
.saved-researchers-panel #saved-researchers-list a { color: #23483e; }
.researcher-filter-row select { min-height: 2.7rem; }
.outreach-workflow-controls { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.outreach-workflow-controls label { display: grid; gap: .35rem; }
.outreach-workflow-controls [hidden] { display: none; }
.outreach-workflow-controls select, .outreach-workflow-controls input { min-height: 2.5rem; padding: .4rem .6rem; border: 1px solid #b8c9c1; border-radius: .5rem; background: white; font: inherit; }
.privacy-page { padding-bottom: 4rem; }
.privacy-page .about-hero { max-width: 72rem; margin: 0 auto 2rem; }
.privacy-page .about-story-grid { max-width: 72rem; margin: 0 auto; }
.contact-form-note a { color: #23483e; text-decoration: underline; }
@media (max-width: 650px) { .first-visit-guide { display: block; } .first-visit-guide button { margin-top: .75rem; } }
.gmail-connect-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; flex-basis: 100%; }
.gmail-connect-row p { flex: 1 1 18rem; margin: 0; color: var(--color-muted); font-size: 0.82rem; }
