@font-face {
  font-family: "Muli";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/muli-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Saira Extra Condensed";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/saira-extra-condensed-regular.woff2") format("woff2");
}

:root {
  --accent: #bd5d38;
  --accent-dark: #964827;
  --accent-soft: #f7ebe5;
  --ink: #343a40;
  --muted: #868e96;
  --line: #dee2e6;
  --paper: #ffffff;
  --nav-bg: #35537c;
  --nav-width: 17rem;
  --heading-font: "Saira Extra Condensed", "Arial Narrow", "Aptos Display", Arial, sans-serif;
  --body-font: "Muli", "Aptos", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--muted);
  background: var(--paper);
  font-family: var(--body-font);
  font-size: 1rem;
  line-height: 1.65;
}

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

a:hover,
a:focus-visible {
  color: var(--accent-dark);
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.8rem;
  color: #111;
  background: #fff;
  border: 2px solid #111;
  transform: translateY(-160%);
}

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

.side-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: var(--nav-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.35rem;
  color: #fff;
  background: var(--nav-bg);
  text-align: center;
}

.brand {
  display: block;
  color: #fff;
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: #fff;
}

.brand-name {
  display: none;
  font-family: var(--heading-font);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.profile-frame {
  display: block;
  width: 12rem;
  height: 12rem;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  border: 0.5rem solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: #fff;
}

.profile-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
}

.nav-link {
  display: block;
  width: 100%;
  padding: 0.35rem 0.25rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: #fff;
}

.nav-toggle {
  display: none;
}

.page-content {
  margin-left: var(--nav-width);
}

.resume-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 3rem;
}

.section-inner {
  width: min(100%, 66rem);
}

.section-inner.wide {
  width: min(100%, 74rem);
}

h1,
h2,
h3 {
  margin: 0;
  color: #343a40;
  font-family: var(--heading-font);
  font-weight: 850;
  line-height: 1.08;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0.4rem;
  font-size: clamp(4.8rem, 10vw, 6rem);
  letter-spacing: -0.055em;
}

h1 span {
  color: var(--accent);
}

h2 {
  margin-bottom: 3.1rem;
  font-size: clamp(3rem, 6vw, 3.5rem);
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1rem;
}

.subheading {
  margin-bottom: 1rem;
  color: var(--muted);
  font-family: var(--heading-font);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: 0.035em;
  line-height: 1.35;
  text-transform: uppercase;
}

.contact-line {
  margin-bottom: 2.1rem;
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
}

.lead {
  max-width: 60rem;
  font-size: 1.12rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.social-links a {
  min-width: 3.65rem;
  height: 3.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  color: #fff;
  background: #495057;
  border-radius: 50%;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 160ms ease, transform 160ms ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: #fff;
  background: var(--accent);
  transform: translateY(-2px);
}

hr {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--line);
}

.resume-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3.25rem;
}

.resume-item:last-child {
  margin-bottom: 0;
}

.resume-content {
  flex: 1 1 auto;
  min-width: 0;
}

.resume-date {
  flex: 0 0 8.5rem;
  padding-top: 0.15rem;
  color: var(--accent);
  font-size: 1rem;
  text-align: right;
  white-space: nowrap;
}

.teaching-subheading {
  margin: 4rem 0 2.25rem;
  font-size: 2.4rem;
}

.publication {
  padding: 0;
}

.authors {
  margin: 0.7rem 0 0.6rem;
  color: var(--muted);
  font-family: var(--heading-font);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1.45;
  text-transform: none;
}

.paper-links {
  margin-bottom: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

@media (max-width: 991px) {
  :root {
    --nav-height: 4.25rem;
  }

  .side-nav {
    inset: 0 0 auto 0;
    width: auto;
    min-height: var(--nav-height);
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 0.7rem 1rem;
    text-align: left;
  }

  .brand-name {
    display: block;
  }

  .profile-frame {
    display: none;
  }

  .nav-toggle {
    width: 3rem;
    height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 0.25rem;
    cursor: pointer;
  }

  .nav-toggle span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .nav-toggle-lines,
  .nav-toggle-lines::before,
  .nav-toggle-lines::after {
    width: 1.25rem;
    height: 2px;
    display: block;
    background: currentColor;
    content: "";
  }

  .nav-toggle-lines {
    position: relative;
  }

  .nav-toggle-lines::before {
    position: absolute;
    top: -0.38rem;
  }

  .nav-toggle-lines::after {
    position: absolute;
    top: 0.38rem;
  }

  .nav-links {
    grid-column: 1 / -1;
    max-height: 0;
    align-items: flex-start;
    overflow: hidden;
    transition: max-height 220ms ease, padding 220ms ease;
  }

  .side-nav.open .nav-links {
    max-height: 19rem;
    padding: 0.65rem 0 0.35rem;
  }

  .nav-link {
    padding: 0.38rem 0;
  }

  .page-content {
    margin-left: 0;
    padding-top: var(--nav-height);
  }

  .resume-section {
    min-height: auto;
    padding: 4.25rem 1.6rem;
  }

  .about {
    min-height: calc(100vh - var(--nav-height));
  }
}

@media (max-width: 700px) {
  h1 {
    font-size: clamp(3.55rem, 18vw, 5rem);
  }

  h2 {
    margin-bottom: 2.25rem;
    font-size: clamp(2.75rem, 14vw, 3.65rem);
  }

  .resume-item {
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 2.75rem;
  }

  .resume-date {
    order: -1;
    flex-basis: auto;
    text-align: left;
  }

}

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

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

@media print {
  .side-nav {
    display: none;
  }

  .page-content {
    margin: 0;
  }

  .resume-section {
    min-height: 0;
    display: block;
    padding: 1.2rem 0;
    break-inside: avoid;
  }

  a {
    color: inherit;
  }
}
