:root {
  --paper: #f4f0e8;
  --ink: #202321;
  --muted: #6e716b;
  --line: rgba(32, 35, 33, 0.16);
  --accent: #d75235;
  --accent-soft: #e8b15d;
  --grid: rgba(32, 35, 33, 0.055);
  --grid-major: rgba(32, 35, 33, 0.09);
  --panel: rgba(255, 253, 248, 0.72);
  --shadow: 0 18px 50px rgba(41, 35, 26, 0.08);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", sans-serif;
}
.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--paper);
  animation: splash-exit 0.55s ease 0.95s forwards;
}
.intro-splash img {
  width: min(32vw, 160px);
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  animation: splash-logo 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes splash-logo {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes splash-exit {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
@keyframes site-reveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.site-shell {
  animation: site-reveal 0.7s ease 1.05s both;
}
html.intro-seen .intro-splash {
  display: none;
}
html.intro-seen .site-shell {
  animation: none;
  opacity: 1;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.72;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size:
    28px 28px,
    28px 28px,
    140px 140px,
    140px 140px;
  animation: grid-drift 36s ease-in-out infinite alternate;
}
@keyframes grid-drift {
  from {
    background-position:
      0 0,
      0 0,
      0 0,
      0 0;
  }
  to {
    background-position:
      28px 28px,
      28px 28px,
      140px 140px,
      140px 140px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
  .intro-splash {
    display: none;
  }
  .site-shell {
    animation: none;
    opacity: 1;
  }
}
a {
  color: inherit;
  text-decoration: none;
}
.site-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0 0 0 5.5vw;
  overflow: hidden;
}
.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(14px);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
}
.wordmark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.main-nav {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  margin-left: calc(20% - 70px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-padding-inline: 30px;
  padding: 0 30px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
}
.main-nav::-webkit-scrollbar {
  display: none;
}
.nav-track {
  display: flex;
  flex: 0 0 auto;
  gap: clamp(1rem, 3vw, 3.25rem);
  min-width: max-content;
}
.main-nav a {
  position: relative;
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--muted);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.65rem;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}
.main-nav a.active {
  color: var(--ink);
}
.theme-toggle {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  margin-right: 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  cursor: pointer;
  font-size: 1rem;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}
.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--panel);
}
.theme-icon {
  display: block;
  line-height: 1;
  transition: transform 0.25s ease;
}
.dark .theme-toggle {
  border-color: var(--accent);
  color: #202725;
  background: var(--accent);
}
.dark .theme-toggle:hover {
  background: var(--accent-soft);
}
.layout {
  display: grid;
  grid-template-columns: minmax(180px, 20%) 1fr;
  gap: 8px;
  height: calc(100vh - 92px);
}
.profile-rail {
  position: relative;
  padding: 76px 0 35px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.content-column {
  min-width: 0;
  overflow-y: auto;
  padding-right: 32px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-soft) transparent;
}
.portrait-wrap {
  position: relative;
  width: min(100%, 210px);
  aspect-ratio: 1 / 1.12;
  margin-bottom: 25px;
}
.portrait {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
.status-dot {
  position: absolute;
  right: -7px;
  bottom: 15px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #5f9a67;
  border: 3px solid var(--paper);
}
.eyebrow,
.kicker,
.project-type,
.rail-footer {
  color: var(--accent);
  font:
    500 0.65rem "DM Mono",
    monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.profile-rail h1 {
  font-size: clamp(2rem, 3.2vw, 3.3rem);
  line-height: 0.96;
  letter-spacing: -0.09em;
  margin: 8px 0 17px;
}
.role {
  font-weight: 700;
  line-height: 1.6;
  font-size: 0.84rem;
}
.rail-copy {
  max-width: 220px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.75rem;
}
.rail-footer {
  margin-top: 18px;
  padding-bottom: 16px;
  color: var(--muted);
  line-height: 1.8;
}
.social-links {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
}
.social-links a {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  color: var(--ink);
  transition:
    background 0.25s,
    color 0.25s;
}
.social-links svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}
.social-links a:hover {
  background: var(--ink);
  color: var(--paper);
}
.location {
  display: none;
}
.location span {
  color: var(--accent);
}
.content-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.content-column > .intro {
  order: 1;
}
.content-column > .education {
  order: 2;
}
.content-column > .publications {
  order: 3;
}
.content-column > .experience {
  order: 4;
}
.content-column > .awards {
  order: 5;
}
.content-column > .leadership {
  order: 6;
}
.content-column > .academic-achievements {
  order: 7;
}
.content-column > .contact {
  order: 8;
}
.content-column > .site-footer {
  order: 9;
}
.section-block {
  border-bottom: 1px solid var(--line);
  padding: 78px 0;
}
.intro {
  padding-top: 110px;
}
.kicker {
  margin: 0 0 25px;
}
.wave {
  display: inline-block;
  color: var(--accent-soft);
  margin-left: 6px;
}
.intro h2,
.contact h2 {
  font-size: clamp(3.2rem, 7vw, 7.2rem);
  line-height: 0.95;
  letter-spacing: -0.095em;
  margin: 0 0 34px;
  font-weight: 700;
}
.intro h2 {
  font-size: clamp(2.8rem, 5.3vw, 5.5rem);
}
.intro h2 em,
.contact h2 em {
  color: var(--accent);
  font-style: normal;
}
.lede {
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  font-weight: 600;
}
.body-copy {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.9rem;
}
.scholar-note {
  margin: 24px 0 0;
  color: var(--muted);
  font:
    0.78rem "DM Mono",
    monospace;
}
.scholar-note strong {
  color: var(--accent);
  font-weight: 500;
}
.content-column {
  min-width: 0;
}
.section-block {
  border-bottom: 1px solid var(--line);
  padding: 78px 0;
}
.intro {
  padding-top: 110px;
}
.kicker {
  margin: 0 0 25px;
}
.wave {
  display: inline-block;
  color: var(--accent-soft);
  margin-left: 6px;
}
.intro h2,
.contact h2 {
  font-size: clamp(3.2rem, 7vw, 7.2rem);
  line-height: 0.95;
  letter-spacing: -0.095em;
  margin: 0 0 34px;
  font-weight: 700;
}
.intro h2 {
  font-size: clamp(2.8rem, 5.3vw, 5.5rem);
}
.contact h2 {
  max-width: 900px;
  font-size: clamp(2.8rem, 5.8vw, 5.8rem);
  line-height: 1;
  letter-spacing: -0.07em;
  font-weight: 600;
}
.intro h2 em,
.contact h2 em {
  color: var(--accent);
  font-style: normal;
}
.lede {
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  font-weight: 600;
}
.body-copy {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.9rem;
}
.scholar-note {
  margin: 24px 0 0;
  color: var(--muted);
  font:
    0.78rem "DM Mono",
    monospace;
}
.scholar-note strong {
  color: var(--accent);
  font-weight: 500;
}
.belief-note {
  margin: 22px 0 0;
  color: var(--accent);
  font:
    italic 500 0.82rem "DM Mono",
    monospace;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.section-heading h2 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.82rem;
}
.section-mark {
  color: var(--accent);
  font-size: 1.3rem;
}
.section-note {
  margin-left: auto;
  color: var(--muted);
  font:
    0.66rem "DM Mono",
    monospace;
}
.focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.focus-list li {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 18px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.65;
  font-size: 0.91rem;
}
.number {
  color: var(--accent);
  font:
    0.7rem "DM Mono",
    monospace;
  padding-top: 4px;
}
.award-list {
  display: grid;
  gap: 6px;
}
.award-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  margin: 0;
  padding: 16px 24px;
  border: 1px solid transparent;
  line-height: 1.55;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}
.award-item:hover,
.award-item:focus-within {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.award-item h3 {
  display: inline;
  margin: 0;
  font-size: 0.92rem;
  line-height: inherit;
  font-weight: 800;
}
.award-item h3 small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}
.award-item p {
  display: inline;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: inherit;
}
.award-item h3::after {
  content: ": ";
}
.publication-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  margin: 0;
  padding: 20px 24px;
  border: 1px solid transparent;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}
#publications {
  counter-reset: publication;
}
.publication-item {
  counter-increment: publication;
}
.publication-item > .number {
  font-size: 0;
}
.publication-item > .number::before {
  content: counter(publication, decimal-leading-zero);
  font-size: 0.7rem;
}
.publication-item:hover,
.publication-item:focus-within {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.publication-item h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.35;
}
.publication-item p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}
.publication-item p strong {
  color: var(--accent);
  font-weight: 700;
}
.publication-resources {
  color: var(--accent) !important;
  font-family: "DM Mono", monospace;
}
.publication-link {
  display: inline-flex;
  gap: 8px;
  margin-top: 7px;
  color: var(--accent);
  font:
    500 0.72rem "DM Mono",
    monospace;
}
.publication-link span {
  font-size: 0.9rem;
}
.experience-list {
  display: grid;
  gap: 6px;
}
.experience-item {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 24px;
  padding: 20px 24px;
  border: 1px solid transparent;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}
.experience-item:hover {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.experience-item time {
  padding-top: 4px;
  color: var(--accent);
  font:
    0.7rem "DM Mono",
    monospace;
  text-transform: uppercase;
}
.experience-item h3 {
  margin: 0 0 5px;
  font-size: 1.05rem;
  line-height: 1.35;
}
.experience-org {
  margin: 0 0 12px !important;
  color: var(--ink) !important;
  font-size: 0.82rem !important;
  font-weight: 700;
}
.experience-item p:not(.experience-org) {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}
.experience-item p:last-child {
  margin-bottom: 0;
}
.academic-list {
  display: grid;
  gap: 6px;
}
.academic-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 16px 24px;
  border: 1px solid transparent;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}
.academic-item:hover {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.academic-item time {
  color: var(--accent);
  font:
    0.7rem "DM Mono",
    monospace;
}
.academic-item h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}
.academic-item h3 strong {
  color: var(--accent);
}
.academic-item p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}
.academic-item p a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
}
.project-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
}
.project-card {
  position: relative;
  min-height: 240px;
  padding: 25px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.project-card-featured {
  grid-row: span 2;
  min-height: 494px;
  background: linear-gradient(135deg, #193b39, #326d65);
  color: #f7e8cd;
  border: 0;
}
.project-card-featured .project-type,
.project-card-featured p {
  color: #b9d0be;
}
.project-card h3 {
  margin: 58px 0 15px;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  letter-spacing: -0.08em;
  line-height: 1;
}
.project-card:not(.project-card-featured) h3 {
  margin-top: 40px;
  font-size: 1.5rem;
}
.project-card p {
  max-width: 300px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}
.project-arrow {
  position: absolute;
  right: 23px;
  bottom: 21px;
  font-size: 1.35rem;
}
.project-card-featured .project-arrow {
  color: var(--accent-soft);
}
.writing-row {
  display: grid;
  grid-template-columns: 1fr 100px 20px;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 0.87rem;
}
.writing-row:hover {
  color: var(--accent);
}
.writing-row time {
  color: var(--muted);
  font:
    0.63rem "DM Mono",
    monospace;
  text-transform: uppercase;
}
.writing-row > span:last-child {
  text-align: right;
}
.contact {
  padding-bottom: 100px;
}
.contact-link {
  display: inline-flex;
  gap: 25px;
  align-items: center;
  color: var(--accent);
  font:
    500 clamp(1.1rem, 2.4vw, 1.8rem) "DM Mono",
    monospace;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 8px;
}
.contact-link span {
  font-size: 1.3rem;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0 35px;
  color: var(--muted);
  font:
    0.62rem "DM Mono",
    monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
body.dark {
  --paper: #202725;
  --ink: #eff0e7;
  --muted: #a4aaa0;
  --line: rgba(239, 240, 231, 0.17);
  --grid: rgba(239, 240, 231, 0.055);
  --grid-major: rgba(239, 240, 231, 0.09);
  --panel: rgba(39, 47, 44, 0.8);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}
.dark .portrait {
  box-shadow: none;
}
.dark .status-dot {
  border-color: var(--paper);
}
.dark .wordmark img {
  filter: invert(1);
  mix-blend-mode: screen;
}
.dark .intro-splash img {
  filter: invert(1);
  mix-blend-mode: screen;
}
@media (max-width: 800px) {
  .site-shell {
    height: auto;
    min-height: 100vh;
    padding: 0 6vw;
    overflow: visible;
  }
  .topbar {
    height: 76px;
  }
  .main-nav {
    margin-left: 0;
    font-size: 0.58rem;
  }
  .nav-track {
    gap: 15px;
  }
  .layout {
    display: block;
    height: auto;
  }
  .profile-rail {
    position: relative;
    top: auto;
    min-height: 0;
    padding: 45px 0 35px;
    display: grid;
    grid-template-columns: 110px 1fr;
    column-gap: 20px;
  }
  .content-column {
    overflow: visible;
    padding-right: 0;
  }
  .portrait-wrap {
    width: 110px;
    grid-row: span 4;
    margin: 0;
  }
  .profile-rail .eyebrow {
    align-self: end;
    margin: 0;
  }
  .profile-rail h1 {
    font-size: 2.1rem;
    margin: 6px 0;
  }
  .profile-rail .role {
    margin: 0;
  }
  .rail-copy {
    grid-column: 1 / -1;
    max-width: 500px;
    margin-bottom: 4px;
  }
  .social-links {
    grid-column: 1 / -1;
    margin-top: 0;
  }
  .rail-footer {
    position: static;
    display: block;
    grid-column: 1 / -1;
    margin-top: 26px;
    padding-bottom: 28px;
  }
  .section-block {
    padding: 55px 0;
  }
  .intro {
    padding-top: 50px;
  }
  .experience-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .intro h2,
  .contact h2 {
    font-size: clamp(3.1rem, 14vw, 5rem);
  }
  .project-grid {
    grid-template-columns: 1fr 1fr;
  }
  .project-card-featured {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 330px;
  }
  .site-footer {
    display: block;
    line-height: 2;
  }
  .site-footer span {
    display: block;
  }
}
@media (max-width: 480px) {
  .main-nav {
    gap: 11px;
  }
  .theme-toggle {
    width: 34px;
    height: 34px;
    margin-right: 0;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-card {
    min-height: 210px;
  }
  .project-card-featured {
    min-height: 300px;
  }
  .writing-row {
    grid-template-columns: 1fr 20px;
    gap: 8px;
  }
  .writing-row time {
    grid-column: 1;
    grid-row: 2;
  }
  .writing-row > span:last-child {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .contact {
    padding-bottom: 70px;
  }
}
