@font-face {
  font-family: Roboto;
  src: url("../wp-content/uploads/elementor/google-fonts/fonts/roboto-kfo7cnqeu92fr1me7ksn66agldtyluama3yuba.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Serif";
  src: url("../wp-content/uploads/elementor/google-fonts/fonts/robotoserif-r70mjywflp6flr3gzx7k8uyuxds9zvwdmxcb8lxygmuii32ugovldx6ugfjl4-3smm_kb_qxsex5ksh0.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --content-width: 1140px;
  --ink: #333;
  --link: #c36;
  --menu-current: #55595c;
  --card-heading: #030;
  --accent: #61ce70;
  --paper: #fff;
  --portfolio-background: #f9faf9;
  --border: #d6d7d7;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
button { color: inherit; font: inherit; }
:focus-visible { outline: 3px solid #276f40; outline-offset: 3px; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  top: 0;
  left: 10px;
  z-index: 2;
  transform: translateY(-120%);
  padding: .5rem 1rem;
  background: var(--paper);
}
.skip-link:focus { transform: translateY(0); }

.page-width {
  width: min(var(--content-width), calc(100% - 20px));
  margin-inline: auto;
}
.site-header { background: var(--paper); }
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 90px;
  gap: 24px;
  padding-block: 14px;
}
.site-name {
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--link);
  text-decoration: none;
}
.site-nav { display: flex; gap: 30px; padding-inline: 15px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: .25em;
}
.menu-toggle { display: none; }
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }

.page-main { padding-top: 10px; }
.page-main > p:empty { display: none; }
h1, h2, h3 { line-height: 1.2; font-weight: 600; margin-top: 0; }
h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.8rem; margin-bottom: .75rem; }
h3 { font-size: 1.35rem; margin-bottom: .55rem; }
p { margin: 0 0 1rem; }
figure { margin: 0; }
figure img { display: block; margin-inline: auto; }
figcaption { text-align: center; margin-top: .4rem; }
.site-footer { text-align: right; padding-block: 1.75rem 1rem; }
.site-footer p { margin: 0; }

.portfolio .page-main {
  width: 100%;
  padding: 10px max(10px, (100% - var(--content-width)) / 2) 30px;
  background: var(--portfolio-background);
}
.portfolio .site-footer { padding-top: 1rem; }
.tab-list { display: none; }
.has-js .tab-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 30px;
}
.tab-list button {
  padding: 15px clamp(16px, 3vw, 36px);
  border: 1px solid #858585;
  background: #eff0f1;
  color: #54595f;
  font-family: Roboto, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: .25em;
  cursor: pointer;
}
.tab-list button:hover { background: #61ce7099; }
.tab-list button[aria-selected="true"] {
  color: #0c0c0c;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 2px 8px #0003;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 20px;
}
.project-card {
  text-align: center;
  min-width: 0;
  font-family: Roboto, system-ui, sans-serif;
  color: #000;
  background: var(--portfolio-background);
  box-shadow: 0 2px 10px #0005;
}
@media (hover: hover) {
  .project-card:hover { background: #fafaeb; }
}
.project-card > figure img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}
.project-card > figure, .project-card > figure a { display: block; }
.project-card h2 {
  color: var(--card-heading);
  margin: .8rem 0 1rem;
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 600;
}
.project-card h2:first-child { margin-top: 0; }
.project-card h2 a { color: inherit; text-decoration: none; }
.project-card h2 a:hover { text-decoration: underline; }
.project-card p { margin: 0 0 2rem; }

@media (min-width: 768px) {
  #portfolio-panel-3 .project-card { margin-inline: 10px; }
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
  align-items: center;
  margin-block: 1.5rem;
}
.feature-row img { max-height: 840px; object-fit: contain; }
.project-page .content-image { margin-block: 1.25rem; }
.project-page .page-main > .content-image:last-child { margin-bottom: 0; }
.project-page .content-image img { max-width: min(100%, 800px); }
.project-page .feature-row .content-image { margin-block: 0; }

.mobile-robot-page .page-main > h1 { margin-inline: 0; }
.mobile-robot-page .feature-row {
  gap: 0;
  margin-block-end: 0;
}
.mobile-robot-page .feature-row > * { padding: 10px; }
.mobile-robot-page .feature-row p,
.mobile-robot-page figcaption {
  color: #666;
  font-family: Roboto, system-ui, sans-serif;
}
.mobile-robot-page .robot-print {
  display: grid;
  grid-template-columns: minmax(0, 35.457%) minmax(0, 50%);
  align-items: center;
  margin-block: 0;
  padding-block-end: 20px;
}
.mobile-robot-page .robot-print img {
  max-width: calc(100% - 20px);
  margin: 10px;
}
.mobile-robot-page .robot-print figcaption { margin: 10px; }
.mobile-robot-page .content-image:not(.robot-print) figcaption {
  margin-top: 0;
  font-style: italic;
}

:is(.force-sensor-page, .capacitance-page) .page-main { width: 100%; }
:is(.force-sensor-page, .capacitance-page) .page-main > h1,
.force-sensor-page .page-main > h1 + div,
.capacitance-page .repository-bar {
  width: min(var(--content-width), calc(100% - 20px));
  margin-inline: auto;
}
.force-sensor-page .page-main > h1 + div,
:is(.force-sensor-page, .capacitance-page) .feature-row {
  color: #000;
  font-family: Roboto, system-ui, sans-serif;
}
:is(.force-sensor-page, .capacitance-page) .feature-row {
  margin: 0;
  padding: 10px max(10px, (100% - var(--content-width)) / 2);
  gap: 0;
}
.force-sensor-page .feature-row:nth-child(even of .feature-row) {
  background: radial-gradient(ellipse at center, #f3f0f0, #fff);
}
.force-sensor-page .feature-row > div,
.capacitance-page .feature-row > * { padding: 10px; }
.force-sensor-page .feature-row p:last-child { margin-bottom: 0; }
.force-sensor-page .feature-row .content-image { margin-block: 50px; }
.force-sensor-page .feature-row img { max-height: none; }

.manipulator-page .page-main > h1 { margin-inline: 0; }
.manipulator-page .feature-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 35%);
  gap: 0 5%;
  margin-block-end: 0;
}
.manipulator-page .feature-row p {
  color: #000;
  font-family: "Roboto Serif", Georgia, serif;
}
.manipulator-page .feature-row figure { padding: 10px; }

.capacitance-page .repository-bar {
  display: flex;
  padding-block-end: 10px;
}
.capacitance-page .repository-bar + .feature-row {
  background: radial-gradient(ellipse at center, #ece2e2, #fff);
}
.repository-link {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #333;
  color: #fff;
}
.repository-link:hover { background: #474747; }
.repository-link svg { fill: currentColor; }
.repository-link-label, .carousel-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cv-section {
  font-family: Roboto, system-ui, sans-serif;
  margin-bottom: 1.25rem;
}
.cv-section:last-child { margin-bottom: 0; }
.cv-section h2 {
  margin: 0 0 .625rem;
  color: var(--card-heading);
  font: 500 2.5rem/1.2 Helvetica, Arial, sans-serif;
  text-align: center;
}
.cv-card {
  padding: 2rem;
  background: var(--paper);
  box-shadow: 0 2px 10px #0005;
  overflow-wrap: anywhere;
}
.cv-card + .cv-card { margin-top: 1.25rem; }
.cv-entry { color: #111; line-height: 1.8; }
.cv-entry h3 {
  color: var(--ink);
  font-size: 1.75rem;
  margin: .5rem 0 1rem;
}
.cv-entry ul {
  margin: 0 0 1rem;
  color: var(--ink);
  line-height: 1.5;
}
.cv-section hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid #a4a4a4;
}
.cv-with-logo {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: start;
  gap: .5rem;
}
.cv-columns {
  display: grid;
  grid-template-columns: minmax(0, 15%) minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem;
  padding: 1rem 1rem 0 2rem;
}
.cv-columns > * { padding: .625rem; }
.cv-columns img { width: 100%; }
.cv-columns p:first-child {
  color: #111;
  letter-spacing: .04em;
}
.cv-columns p:nth-child(2) { color: #6a6a6a; }
.cv-columns ul {
  margin: 0;
  padding-inline-start: 1rem;
}
.cv-columns li + li { margin-top: .2rem; }
.cv-columns a { text-decoration: none; }
.cv-columns a:hover { text-decoration: underline; }

.wp-block-file {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  flex-wrap: wrap;
}
.page-main:has(> .wp-block-file) > h1 { margin-bottom: 1rem; }
.page-main > p:has(+ .wp-block-file) { margin-bottom: .75rem; }
.wp-block-file__button {
  display: inline-block;
  padding: .7rem 1.25rem;
  color: #fff;
  background: #32373c;
  font-size: .9rem;
  border-radius: 1.4rem;
}
.wp-block-file__button { font-size: inherit; }
.wp-block-file__button:visited { color: #fff; }
.page-main:has(> .report-link) > h1 { margin-inline: 0; }
.report-link {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: 1rem;
  padding: .625rem 1.5rem;
  border-radius: 3px;
  color: #18381f;
  background: var(--accent);
  text-decoration: none;
  font-family: Roboto, system-ui, sans-serif;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.2;
}
.report-link:hover { background: #55c367; }
.report-link svg, .carousel-button svg { fill: currentColor; }

.carousel-stage { position: relative; }
.carousel-slide img { margin-inline: auto; }
.carousel-slide { margin-block: 1rem; }
.carousel.is-enhanced .carousel-slides {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  margin-inline: 2rem;
  touch-action: pan-y pinch-zoom;
}
.carousel.is-enhanced .carousel-slide,
.carousel.is-enhanced .carousel-slides::before { grid-area: 1 / 1; }
.carousel.is-enhanced .carousel-slide { margin: 0; }
.carousel.is-enhanced .carousel-slides::before {
  /* The tallest screenshot reserves enough space for stable controls. */
  content: "";
  width: min(100%, 681px);
  aspect-ratio: 681 / 566;
}
.carousel-button {
  position: absolute;
  inset-block-start: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: #5e3737;
  background: transparent;
  cursor: pointer;
}
.carousel-button[data-previous] { inset-inline-start: 0; }
.carousel-button[data-next] { inset-inline-end: 0; }
.carousel-button svg { width: 40px; height: 40px; }
.carousel-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .25rem .75rem;
  margin-top: .625rem;
}
.carousel-navigation {
  display: flex;
  grid-column: 2;
  flex-wrap: wrap;
  justify-content: center;
}
.carousel-pause {
  grid-column: 3;
  justify-self: start;
  min-height: 36px;
  cursor: pointer;
  border: 1px solid #c7c7c7;
  background: #fff;
  border-radius: 4px;
  padding: .2rem .65rem;
}
.carousel-dot {
  width: 26px;
  min-height: 36px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.carousel-dot::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8b8b8b;
  margin: auto;
}
.carousel-dot[aria-current="true"]::before { background: #222; }

@media (max-width: 540px) {
  .carousel-button svg { width: 30px; height: 30px; }
  .carousel-controls { grid-template-columns: minmax(0, 1fr); }
  .carousel-navigation, .carousel-pause {
    grid-column: 1;
    justify-self: center;
  }
}

.legacy-content { max-width: 820px; }
.legacy-content h2, .legacy-content h3 { margin-top: 1.55rem; }
.archive-entry { margin: 0 0 2rem; }
.archive-entry h2 a { text-decoration: none; }
.archive-entry h2 a:hover { text-decoration: underline; }
.archive-entry img { display: block; max-width: min(100%, 800px); }
.comments { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1rem; }
.comments time { display: block; margin-bottom: .75rem; }

@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { gap: 1rem; }
}
@media (max-width: 767px) {
  .header-content {
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 0;
    min-height: 64px;
    padding-block: 0;
  }
  .site-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .site-nav {
    flex: 0 0 calc(100% + 20px);
    flex-direction: column;
    gap: 0;
    margin-inline: -10px;
    padding: 0;
  }
  .site-nav a {
    padding: 1.25rem 20px;
    border-top: 1px solid var(--border);
    color: var(--ink);
  }
  .site-nav a[aria-current="page"] {
    color: #fff;
    background: var(--menu-current);
    text-decoration: none;
  }
  .has-js .menu-toggle {
    display: grid;
    flex: 0 0 44px;
    min-height: 44px;
    place-items: center;
    padding: 8px;
    border: 0;
    border-radius: 4px;
    background: #e9eaec;
    cursor: pointer;
  }
  .has-js .site-nav { display: none; }
  .has-js .menu-open .site-nav { display: flex; }
  .page-main, .portfolio .page-main { padding-top: 4px; }
  .project-grid, .feature-row { grid-template-columns: minmax(0, 1fr); }
  .manipulator-page .feature-row { grid-template-columns: minmax(0, 1fr); }
  .mobile-robot-page .robot-print { grid-template-columns: minmax(0, 1fr); }
  .mobile-robot-page .robot-print figcaption { text-align: left; }
  .project-grid { margin-inline: 20px; gap: 20px; }
  #portfolio-panel-0 .project-grid { margin-inline-end: 5px; }
  #portfolio-panel-0 .project-card:nth-child(5) { margin-top: 20px; }

  /* Each phone-width tab sits immediately above its own panel. */
  .has-js .portfolio .page-main { display: grid; grid-template-columns: minmax(0, 1fr); }
  .has-js .tab-list { display: contents; }
  .tab-list button { padding: 15px 12px; }
  .portfolio [role="tabpanel"] { margin-block: 30px 10px; }
  #portfolio-tab-0 { grid-row: 1; }
  #portfolio-panel-0 { grid-row: 2; }
  #portfolio-tab-1 { grid-row: 3; }
  #portfolio-panel-1 { grid-row: 4; }
  #portfolio-tab-2 { grid-row: 5; }
  #portfolio-panel-2 { grid-row: 6; }
  #portfolio-tab-3 { grid-row: 7; }
  #portfolio-panel-3 { grid-row: 8; }

  .site-footer { text-align: center; }
  .page-main > h1 { margin-inline: 10px; }
  .cv-with-logo, .cv-columns { grid-template-columns: minmax(0, 1fr); }
  .cv-with-logo figure { width: max(2rem, 10%); }
}
