:root {
  color-scheme: light;
  --bg: #f8f8f6;
  --paper: #ffffff;
  --ink: #202020;
  --muted: #555f69;
  --subtle: #6f7780;
  --line: #d6d6d2;
  --line-soft: #e8e8e3;
  --accent: #1674b3;
  --accent-soft: #eaf5fb;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15.5px;
  line-height: 1.58;
}

a {
  color: inherit;
}

.inline-link {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.inline-link:hover {
  text-decoration-color: currentColor;
}

.kicker-link,
.heading-link {
  color: inherit;
  text-decoration: none;
}

.kicker-link:hover,
.heading-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-header,
.page-shell,
.site-footer {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 15px 0;
  background: rgba(248, 248, 246, 0.94);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.nav-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.nav-links a,
.footer-links a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.nav-links a:hover,
.footer-links a:hover,
.profile-links a:hover,
.paper-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.page-shell {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 58px;
  padding: 44px 0 42px;
}

.profile-card {
  position: sticky;
  top: 84px;
  align-self: start;
}

.portrait {
  width: 158px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.profile-card h1 {
  margin: 20px 0 8px;
  font-size: 1.92rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.profile-title,
.profile-focus {
  margin: 0;
  color: var(--muted);
}

.profile-title {
  color: var(--ink);
  font-weight: 650;
}

.profile-affiliation-link {
  text-decoration: none;
}

.profile-affiliation-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.profile-focus {
  margin-top: 12px;
  font-size: 0.95rem;
}

.profile-education-entry {
  display: block;
}

.profile-education-entry + .profile-education-entry {
  margin-top: 8px;
}

.profile-links {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.profile-links a {
  color: var(--accent);
  font-size: 0.93rem;
  font-weight: 650;
  text-decoration: none;
}

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#about {
  order: 1;
}

#soccer {
  order: 2;
}

#publications {
  order: 3;
}

#background {
  order: 4;
}

#research {
  order: 5;
}

#news {
  order: 6;
}

#projects {
  order: 7;
}

#misc {
  order: 8;
}

#timeline {
  order: 9;
}

#design-origins {
  order: 10;
}

.section {
  scroll-margin-top: 78px;
  padding: 0 0 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line-soft);
}

.section:last-child {
  margin-bottom: 0;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 760;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h2,
h3,
p,
ul {
  margin-top: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.32rem;
  line-height: 1.25;
  font-weight: 760;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 6px;
  font-size: 1.02rem;
  line-height: 1.34;
  letter-spacing: 0;
}

p {
  color: var(--muted);
}

.goal-box {
  margin-top: 18px;
  padding-left: 15px;
  border-left: 2px solid var(--accent);
}

.goal-box p {
  margin-bottom: 0;
}

.goal-box strong {
  color: var(--ink);
}

.news-list {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  color: var(--muted);
}

.news-list time {
  color: #8a642d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  font-weight: 650;
}

.interest-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.interest-list li {
  padding-left: 15px;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.interest-list strong {
  color: var(--ink);
}

.publication,
.entry {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}

.publication:first-of-type,
.entry:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.entry-year,
.publication-meta {
  color: var(--subtle);
  font-size: 0.9rem;
}

.entry-year {
  color: #9a6b29;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  font-weight: 650;
}

.publication p,
.entry p {
  margin-bottom: 0;
}

.authors {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.authors strong {
  color: var(--ink);
}

.publication-meta {
  margin-bottom: 8px;
  font-style: italic;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.paper-links a {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.project-lede {
  margin-bottom: 16px;
}

.project-status {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
}

.project-status p {
  margin-bottom: 0;
}

.project-status strong,
.video-copy h3 {
  color: var(--ink);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.video-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.real-robot-block {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #111;
}

.real-robot-intro {
  margin-bottom: 14px;
}

.real-robot-intro h3 {
  margin-bottom: 5px;
}

.real-robot-intro p {
  margin-bottom: 0;
  font-size: 0.93rem;
}

.real-video-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 78%);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 0 10px;
  scroll-snap-type: inline mandatory;
  scrollbar-color: var(--subtle) var(--line-soft);
}

.real-video-item {
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}

.real-video-item video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #111;
  border-radius: 4px;
}

.real-video-item figcaption {
  padding-top: 7px;
  color: var(--subtle);
  font-size: 0.86rem;
}

.video-copy {
  padding: 13px 14px 15px;
}

.video-copy h3 {
  margin-bottom: 5px;
}

.video-copy p {
  margin-bottom: 0;
  font-size: 0.93rem;
}

.confidentiality-note {
  margin: 18px 0 0;
  color: var(--subtle);
  font-size: 0.9rem;
  font-style: italic;
}

.entry-list {
  display: grid;
}

.project-gallery {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.project-gallery-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(190px, 0.7fr);
  min-height: 190px;
  cursor: pointer;
  list-style: none;
}

.project-gallery-summary::-webkit-details-marker {
  display: none;
}

.project-gallery-cover {
  display: block;
  min-width: 0;
  height: 190px;
  padding: 10px;
  background: #efefec;
  border-right: 1px solid var(--line-soft);
}

.project-gallery-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-gallery-summary-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  position: relative;
  padding: 24px 52px 24px 22px;
  color: var(--muted);
}

.project-gallery-summary-copy strong {
  color: var(--ink);
  font-size: 1rem;
}

.project-gallery-summary-copy span {
  color: var(--subtle);
  font-size: 0.88rem;
}

.gallery-open-label {
  display: none;
}

.project-gallery-summary-copy::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.65rem;
  font-weight: 400;
}

.project-gallery[open] .project-gallery-summary {
  display: block;
  min-height: 0;
  border-bottom: 1px solid var(--line-soft);
}

.project-gallery[open] .project-gallery-cover {
  display: none;
}

.project-gallery[open] .project-gallery-summary-copy {
  padding: 12px 52px 12px 14px;
}

.project-gallery[open] .gallery-closed-label {
  display: none;
}

.project-gallery[open] .gallery-open-label {
  display: inline;
}

.project-gallery[open] .project-gallery-summary-copy::after {
  content: "−";
}

.project-gallery-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(255px, 44%);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 14px;
  scroll-snap-type: inline mandatory;
  scrollbar-color: var(--subtle) var(--line-soft);
}

.project-gallery-groups {
  display: grid;
}

.project-gallery-group {
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.project-gallery-group:first-child {
  border-top: 0;
}

.project-gallery-group h3 {
  margin: 0;
  padding: 0 14px;
  color: var(--ink);
  font-size: 0.92rem;
}

.project-gallery-group .project-gallery-strip {
  padding-top: 10px;
}

.project-gallery-item {
  display: grid;
  grid-template-rows: 250px auto;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  scroll-snap-align: start;
}

.project-gallery-item img {
  width: 100%;
  height: 250px;
  padding: 8px;
  object-fit: contain;
  background: #efefec;
}

.project-gallery-item span {
  padding: 8px 10px 10px;
  color: var(--subtle);
  font-size: 0.82rem;
}

.project-gallery-item:hover {
  border-color: var(--accent);
}

.project-gallery-item:hover span {
  color: var(--accent);
  text-decoration: underline;
}

.design-project-separator {
  margin: 36px 0 30px;
  border-top: 1px solid var(--line-soft);
}

.timeline {
  display: grid;
  gap: 8px;
}

.timeline div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}

.timeline div:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline span {
  color: #9a6b29;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  font-weight: 650;
}

.timeline p {
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0 38px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

.site-footer p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 860px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-shell {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 34px;
  }

  .profile-card {
    position: static;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }

  .portrait {
    width: 132px;
    grid-row: span 4;
  }

  .profile-card h1 {
    margin-top: 0;
  }

  .profile-links {
    display: flex;
    flex-wrap: wrap;
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .site-header,
  .page-shell,
  .site-footer {
    width: min(100% - 28px, 1080px);
  }

  .nav-links {
    gap: 8px 10px;
  }

  .footer-links {
    gap: 10px;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .profile-card,
  .publication,
  .entry,
  .timeline div {
    grid-template-columns: 1fr;
  }

  .profile-card {
    gap: 14px;
  }

  .portrait {
    width: 118px;
    grid-row: auto;
  }

  .section {
    scroll-margin-top: 150px;
    padding-bottom: 28px;
    margin-bottom: 28px;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .real-video-strip {
    grid-auto-columns: 90%;
  }

  .project-gallery-summary {
    grid-template-columns: 1fr;
  }

  .project-gallery-cover {
    height: 180px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .project-gallery-summary-copy {
    padding: 16px 48px 16px 14px;
  }

  .project-gallery-strip {
    grid-auto-columns: 86%;
  }
}
