:root {
  color-scheme: light;
  --bg: #eeece8;
  --paper: #f8f6f1;
  --band: #dccab6;
  --nav: #211a35;
  --nav-soft: #33294a;
  --text: #26232b;
  --muted: #6f6a65;
  --link: #315f8d;
  --link-hover: #193c63;
  --accent: #9b7352;
  --border: #c9c0b4;
  --max-width: 1060px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.site-hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  place-items: center;
  background: var(--nav);
  color: #fff;
  text-align: center;
}

.site-hero__image,
.site-hero__shade {
  position: absolute;
  inset: 0;
}

.site-hero__image {
  background-image: url("assets/projects/robotic-laboratory.jpeg");
  background-position: center 45%;
  background-size: cover;
  transform: scale(1.02);
}

.site-hero__shade {
  background:
    linear-gradient(180deg, rgba(33, 26, 53, 0.38), rgba(33, 26, 53, 0.74)),
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.12), transparent 38%);
}

.site-hero__content {
  position: relative;
  width: min(100% - 40px, 900px);
  padding: 4rem 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.46);
}

.site-hero__eyebrow {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  font-weight: 400;
  line-height: 0.98;
}

.site-hero__content > p:last-child {
  margin: 1.1rem 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2vw, 1.45rem);
  font-weight: 600;
}

.site-nav-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav);
  box-shadow: 0 10px 24px rgba(33, 26, 53, 0.16);
}

.site-nav-bar__inner {
  width: min(100% - 40px, var(--max-width));
  min-height: 50px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.masthead__nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}

.masthead__nav a {
  display: inline-flex;
  min-height: 50px;
  padding: 0 1.25rem;
  align-items: center;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  font-weight: 700;
}

.masthead__nav a:last-child {
  border-inline-end: 1px solid rgba(255, 255, 255, 0.12);
}

.masthead__nav a:hover,
.masthead__nav a.is-active {
  background: var(--nav-soft);
  color: #fff;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: var(--nav-soft);
}

.page {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
  padding: 0 0 64px;
}

.site-view[hidden] {
  display: none;
}

.section {
  margin: 0;
  padding: 3.5rem 0;
  scroll-margin-top: 72px;
}

.section + .section {
  border-top: 1px solid rgba(122, 108, 92, 0.28);
}

.section h2 {
  margin: 0 0 1rem;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  font-weight: 400;
  line-height: 1.12;
}

.section h3 {
  margin: 2rem 0 0.65rem;
  color: var(--text);
  font-size: 1.08rem;
}

.section p {
  margin: 0 0 0.95rem;
}

.section ul,
.section ol {
  margin: 0.4rem 0 0.9rem 1.35rem;
  padding: 0;
}

.section li {
  margin: 0.35rem 0;
}

.section-kicker {
  margin: 0 0 0.5rem !important;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-intro,
.publication-note {
  color: var(--muted);
}

.home-profile {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
  padding-top: 4.25rem;
}

.home-profile__portrait {
  margin: 0;
}

.home-profile__portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  object-position: center 28%;
  border: 8px solid var(--paper);
  box-shadow: 0 18px 38px rgba(88, 72, 54, 0.18);
}

.home-profile__lead {
  max-width: 680px;
  color: #383238;
  font-size: 1.18rem;
  line-height: 1.62;
}

.profile-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  list-style: none;
  margin: 1.2rem 0 0 !important;
  padding: 0 !important;
}

.profile-links li,
.contact-links li {
  margin: 0;
}

.profile-links a,
.contact-links a {
  font-weight: 700;
}

.text-section {
  max-width: 900px;
}

.cover-artwork,
#updates {
  position: relative;
  background: var(--band);
  box-shadow: 0 0 0 100vmax var(--band);
  clip-path: inset(0 -100vmax);
}

.artwork-carousel {
  max-width: 680px;
  margin: 1.5rem auto 0;
}

.artwork-carousel__viewport {
  overflow: hidden;
}

.artwork-carousel__track {
  display: flex;
  transition: transform 540ms ease;
}

.artwork-carousel__slide {
  display: flex;
  min-height: clamp(430px, 52vw, 600px);
  margin: 0;
  padding: 1rem;
  flex: 0 0 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(122, 108, 92, 0.24);
}

.artwork-carousel__slide img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(500px, 68vh);
  object-fit: contain;
}

.artwork-carousel__slide figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.artwork-carousel__controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 0.8rem;
}

.artwork-carousel__controls button {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid rgba(122, 108, 92, 0.36);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--nav);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.artwork-carousel__controls button:hover,
.artwork-carousel__controls button:focus-visible {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
}

.artwork-carousel__toggle {
  padding: 0 0.7rem;
  font-size: 0.84rem;
}

.artwork-carousel__dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.artwork-carousel__dots button {
  min-width: 10px;
  width: 10px;
  min-height: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(33, 26, 53, 0.34);
}

.artwork-carousel__dots button.is-active {
  background: var(--nav);
}

.featured-video {
  max-width: 900px;
}

.featured-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: 0 18px 38px rgba(88, 72, 54, 0.14);
}

.featured-video__preview {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}

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

.featured-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 74px;
  height: 52px;
  border-radius: 6px;
  background: rgba(33, 26, 53, 0.9);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  place-items: center;
  transform: translate(-50%, -50%);
  transition: background 160ms ease, transform 160ms ease;
}

.featured-video__preview:hover .featured-video__play,
.featured-video__preview:focus-visible .featured-video__play {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.05);
}

.featured-video__preview:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.featured-video__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.updates-list {
  max-width: 880px;
}

.updates-list strong {
  color: var(--text);
}

.section .publication-list {
  margin: 0;
  padding-left: 2rem;
}

.publication-item {
  padding: 1.15rem 0 1.25rem 0.25rem;
  border-bottom: 1px solid rgba(122, 108, 92, 0.28);
}

.publication-item:first-child {
  padding-top: 0.2rem;
}

.publication-item:last-child {
  border-bottom: 0;
}

.publication-item p {
  margin: 0;
}

.publication-item__title {
  color: var(--text);
  font-weight: 700;
}

.publication-item__authors {
  margin-top: 0.25rem !important;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.publication-item__citation {
  margin-top: 0.2rem !important;
  font-size: 0.9rem;
}

.publication-item__toc {
  display: flex;
  width: min(100%, 500px);
  min-height: 110px;
  margin: 1rem 0 0;
  padding: 0.55rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #fff;
}

.publication-item__toc img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
}

.publication-item__toc--cover img {
  max-height: 280px;
}

.patent-list {
  padding-left: 1.4rem;
}

.patent-list li {
  margin-bottom: 0.9rem;
}

.projects-photo {
  display: block;
  width: min(100%, 760px);
  height: auto;
  margin-top: 1.25rem;
  border: 8px solid var(--paper);
  box-shadow: 0 18px 38px rgba(88, 72, 54, 0.16);
}

.site-footer {
  background: var(--nav);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
}

.site-footer__inner {
  display: flex;
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
  padding: 1.35rem 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
}

.visit-counter {
  display: inline-flex;
  align-items: center;
  opacity: 0.88;
}

.visit-counter:hover,
.visit-counter:focus-visible {
  opacity: 1;
}

.visit-counter img {
  display: block;
}

@media (max-width: 820px) {
  .site-hero {
    min-height: 82svh;
  }

  .site-hero__image {
    background-position: 44% center;
  }

  .site-nav-bar__inner {
    justify-content: flex-start;
    min-height: auto;
    padding: 0.6rem 0;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .masthead__nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.6rem;
  }

  .masthead__nav.is-open {
    display: flex;
  }

  .masthead__nav a,
  .masthead__nav a:last-child {
    min-height: 42px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0 0.75rem;
  }

  .home-profile {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .home-profile__portrait {
    width: min(76vw, 310px);
  }

  .artwork-carousel {
    max-width: 100%;
  }
}

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

  .site-hero__content,
  .site-nav-bar__inner,
  .page,
  .site-footer__inner {
    width: min(100% - 28px, var(--max-width));
  }

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

  .site-hero__eyebrow {
    font-size: 0.7rem;
  }

  .section {
    padding: 2.6rem 0;
  }

  .home-profile {
    padding-top: 3rem;
  }

  .artwork-carousel__slide {
    min-height: 430px;
  }

  .artwork-carousel__slide img {
    max-height: 330px;
  }

  .artwork-carousel__controls {
    gap: 0.45rem;
  }

  .section .publication-list {
    padding-left: 1.45rem;
  }
}
