:root {
  --canvas: #f7f4ec;
  --surface: #fffef9;
  --surface-strong: #fffef9;
  --ink: #211b27;
  --muted: #71677c;
  --line: #dacfe3;
  --accent: #7b4aa8;
  --accent-deep: #55306d;
  --signal: #c7a7e1;
  --shadow: 0 20px 55px rgba(55, 37, 72, 0.15);
  --content: 976px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 7%, rgba(123, 74, 168, 0.055), transparent 28rem),
    linear-gradient(90deg, transparent 0 49.9%, rgba(85, 48, 109, 0.02) 50%, transparent 50.1%),
    var(--canvas);
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

::selection {
  color: var(--surface-strong);
  background: var(--accent);
}

a {
  color: var(--accent-deep);
  touch-action: manipulation;
  text-decoration-color: rgba(123, 74, 168, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

img {
  display: block;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: var(--surface-strong);
  background: var(--accent-deep);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 3rem), var(--content));
  margin: 0 auto;
  padding: 1.35rem 1rem 1.1rem;
  border-bottom: 1px solid rgba(45, 36, 53, 0.15);
  background: rgba(247, 244, 236, 0.91);
  backdrop-filter: blur(18px);
}

.site-name {
  display: inline-flex;
  align-items: baseline;
  gap: 0.8rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.133rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.site-title {
  margin: 0;
  font: inherit;
  line-height: 1;
}

.site-title::before {
  content: none;
}

.site-name span {
  color: var(--muted);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 1.6vw, 1.5rem);
  overflow-x: auto;
  padding: 0.35rem 0 0.55rem;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  flex: 0 0 auto;
  position: relative;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-decoration: none;
}

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

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-shell,
.site-footer {
  width: min(calc(100% - 3rem), var(--content));
  margin: 0 auto;
}

.site-content,
.site-content .page__inner-wrap,
.site-content .page__content {
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  padding: 2.75rem 0 2.5rem;
}

.hero,
.section-title {
  scroll-margin-top: 7rem;
}

.site-content #about-me {
  margin-top: 0;
}

.site-content #about-me::before {
  display: none;
  content: none;
}

.hero-copy {
  max-width: none;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-copy > p:not(.eyebrow) {
  max-width: none;
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.62;
}

.hero-profile {
  display: grid;
  align-self: center;
  justify-items: end;
  width: 90px;
  transform: translateY(-2rem);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.3rem;
  width: auto;
  margin-top: 1.1rem;
}

.profile-links a {
  padding: 0.1rem 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  text-decoration-line: underline;
  text-decoration-color: rgba(123, 74, 168, 0.42);
  text-underline-offset: 0.3em;
}

.profile-links a:hover {
  color: var(--accent-deep);
  text-decoration-color: currentColor;
}

.portrait-frame {
  position: relative;
  isolation: isolate;
  align-self: start;
  justify-self: end;
  width: 90px;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.portrait-frame::before {
  position: absolute;
  z-index: 0;
  top: 7px;
  left: 7px;
  width: 100%;
  height: 100%;
  border: 1.75px solid rgba(0, 0, 0, 0.58);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 12px 26px rgba(45, 36, 53, 0.13);
  content: "";
}

.portrait-frame::after {
  position: absolute;
  z-index: 0;
  top: -6px;
  left: -7px;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(85, 48, 109, 0.72);
  border-radius: 50%;
  content: "";
}

.portrait-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.78);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(55, 37, 72, 0.15);
  object-fit: cover;
  object-position: center 22%;
}

.portrait-frame figcaption {
  display: none;
}

.section-title {
  display: block;
  margin: 0;
  padding: 3.05rem 0 0.8rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.933rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  text-wrap: balance;
}

#-news,
#-service {
  border-top: 0;
}

.news-panel {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  margin: 0;
  padding: 0.72rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 1rem;
}

.news-list li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.news-list em {
  color: var(--accent-deep);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.news-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  color: var(--accent-deep);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  list-style: none;
  text-transform: uppercase;
  touch-action: manipulation;
}

.news-disclosure summary::-webkit-details-marker {
  display: none;
}

.news-disclosure summary:hover {
  color: var(--accent);
}

.news-disclosure summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.news-collapse-label {
  display: none;
}

.news-disclosure[open] .news-expand-label {
  display: none;
}

.news-disclosure[open] .news-collapse-label {
  display: inline;
}

#-publications + p {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.paper-box {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: center;
  margin: 0 -0.75rem;
  padding: 1.25rem 0.75rem;
  border: 1px solid transparent;
  border-top-color: var(--line);
  border-radius: 8px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.page__content a.paper-box-link,
.page__content a.paper-box-link:hover {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.paper-box-link:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}

.paper-box:last-of-type {
  margin-bottom: 0;
  border-bottom-color: var(--line);
}

.paper-box::before {
  content: none;
}

.paper-box:hover,
.paper-box:focus-within {
  border-color: rgba(123, 74, 168, 0.32);
  background: rgba(234, 220, 247, 0.42);
  box-shadow: 0 10px 28px rgba(55, 37, 72, 0.08);
  transform: translateX(4px);
}

.paper-box .paper-box-image {
  display: block;
  width: 100%;
  max-width: none;
  order: initial;
}

.paper-box .paper-box-image > div {
  display: grid;
  gap: 0.65rem;
}

.paper-box .paper-box-image img {
  justify-self: center;
  width: auto !important;
  max-width: 100%;
  height: auto !important;
  max-height: 145px;
  aspect-ratio: auto;
  border: 1.5px solid rgba(45, 36, 53, 0.18);
  border-radius: 10px;
  box-shadow: none;
  object-fit: initial;
  transition: transform 180ms ease;
}

.paper-box .paper-box-image img.paper-figure--contain {
  padding: 0;
  background: transparent;
  mix-blend-mode: multiply;
  object-fit: initial;
}

.paper-box .paper-box-text {
  width: 100%;
  max-width: none;
  padding: 0;
  order: initial;
}

.paper-box .paper-box-text p {
  margin: 0 0 0.48rem;
}

.paper-box .paper-box-text p:first-child {
  max-width: 820px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.28;
}

.paper-box .paper-box-text p:first-child strong {
  color: var(--ink);
}

.paper-box .paper-box-text p:nth-child(2) {
  color: var(--ink);
  font-size: 0.82rem;
}

.paper-box .paper-box-text p:nth-child(3) {
  color: var(--accent-deep);
  font-size: 0.76rem;
}

.paper-box .paper-box-text ul {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.paper-box .paper-box-text li {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.badge {
  position: static;
  z-index: auto;
  justify-self: start;
  margin: 0;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(123, 74, 168, 0.28);
  border-radius: 999px;
  color: var(--surface-strong);
  background: rgba(123, 74, 168, 0.94);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  line-height: 1.25;
}

.section-title ~ ul:not(.paper-box ul) {
  color: var(--ink);
}

#-honors-and-awards + ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

#-honors-and-awards + ul li {
  margin: 0;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

#-honors-and-awards + ul em {
  display: inline-block;
  min-width: 10rem;
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.education-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.education-card {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0.8rem 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.education-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 3rem;
}

.education-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.education-logo--csu img {
  width: 3rem;
  height: 3rem;
}

.education-copy {
  min-width: 0;
}

.education-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.education-copy h3,
.education-copy p {
  margin: 0;
}

.education-copy h3 {
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.25;
  text-wrap: balance;
}

.education-period {
  flex: 0 0 auto;
  margin-left: auto !important;
  color: var(--muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  white-space: nowrap;
}

.education-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: baseline;
  margin-top: 0.2rem !important;
}

.education-degree {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.4;
}

.education-detail {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.education-detail a {
  color: var(--accent-deep);
}

#-service ~ p,
#-teaching ~ p {
  margin-top: 1.7rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

#-service ~ ul,
#-teaching ~ ul {
  margin-bottom: 0.75rem;
  padding-left: 1.2rem;
  color: var(--ink);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 0.9rem;
  margin-top: 3.5rem;
  padding: 1.5rem 1rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
}

.site-footer p {
  margin: 0;
  justify-self: start;
}

.site-footer a {
  color: var(--ink);
}

.visitor-counter {
  justify-self: end;
}

.visitor-counter img {
  display: block;
  width: 128px;
  height: auto;
}

.back-to-top {
  justify-self: end;
}

@media (max-width: 800px) {
  .site-header,
  .site-shell,
  .site-footer {
    width: min(calc(100% - 2rem), var(--content));
  }

  .site-header {
    align-items: flex-start;
    padding-top: 1rem;
  }

  .site-name {
    display: grid;
    gap: 0.35rem;
  }

  .site-name span {
    font-size: 0.55rem;
  }

  .site-nav {
    max-width: 60%;
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
  }

  .site-nav a {
    flex: 0 0 auto;
    font-size: 0.82rem;
  }

  .section-title {
    padding-top: 3rem;
  }

  .news-list li {
    grid-template-columns: 5.35rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .paper-box {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .paper-box .paper-box-image {
    max-width: 420px;
  }

  #-honors-and-awards + ul em {
    display: block;
    min-width: 0;
    margin-bottom: 0.25rem;
  }

  .education-card {
    grid-template-columns: 4.75rem minmax(0, 1fr);
  }

  .education-logo {
    width: 4.75rem;
  }
}

@media (max-width: 719px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    justify-content: initial;
    padding: 2.75rem 0 2.5rem;
  }

  .hero-profile {
    width: 90px;
    transform: none;
  }

  .portrait-frame {
    width: 90px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .site-header,
  .site-shell,
  .site-footer {
    width: 100%;
  }

  .site-header {
    position: static;
    display: grid;
    gap: 1.25rem;
    padding-right: 1.2rem;
    padding-left: 1.2rem;
  }

  #main.site-shell {
    padding-right: 1.2rem;
    padding-left: 1.2rem;
  }

  .site-nav {
    max-width: 100%;
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding: 2.5rem 0 2.25rem;
  }

  .profile-links {
    gap: 0.65rem 1rem;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    justify-items: center;
    gap: 0.75rem;
    padding-right: 1.2rem;
    padding-left: 1.2rem;
    text-align: center;
  }

  .site-footer p {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .visitor-counter {
    justify-self: end;
  }

  .back-to-top {
    justify-self: end;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
