@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-300.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #f3f5f7;
  --surface: #ffffff;
  --sidebar: #e8edf1;
  --ink: #172b42;
  --text: #34495e;
  --muted: #6f7f8e;
  --link: #1e638f;
  --line: #d6dee5;
  --line-dark: #b9c6d0;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --sidebar-width: 360px;
  --content-width: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

p,
h1,
h2,
h3,
span {
  overflow-wrap: anywhere;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

button {
  color: inherit;
  font: inherit;
}

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

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

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

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 400;
  line-height: 1.25;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  color: #ffffff;
  background: var(--ink);
  transform: translateY(-160%);
}

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

.site-layout {
  min-height: 100vh;
}

.profile-panel {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  overflow-y: auto;
  color: var(--ink);
  background: var(--sidebar);
  border-right: 1px solid var(--line-dark);
}

.profile-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 2.75rem 2.25rem 2rem;
}

.profile-photo {
  width: 190px;
  aspect-ratio: 1;
  margin: 0 auto 2rem;
  object-fit: cover;
  object-position: center 31%;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.9);
}

.profile-heading {
  min-width: 0;
  text-align: center;
}

.profile-heading h1 {
  margin-bottom: 0.75rem;
  font-size: 2.15rem;
  font-weight: 400;
}

.profile-title {
  margin-bottom: 0.3rem;
  color: var(--ink);
  font-size: 1rem;
}

.profile-affiliation {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-focus {
  margin: 2rem 0;
  padding: 1.25rem 0;
  color: var(--text);
  border-block: 1px solid var(--line-dark);
  font-size: 0.95rem;
  line-height: 1.75;
  text-align: center;
}

.profile-links {
  display: grid;
  min-width: 0;
  gap: 0.65rem;
}

.profile-links > a,
.email-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.85rem;
  padding: 0 0.9rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  font-size: 0.88rem;
}

.profile-links > a:hover {
  color: var(--link);
  background: #ffffff;
  text-decoration: none;
}

.email-control {
  min-width: 0;
  gap: 0.5rem;
}

.email-control span:first-child {
  overflow-wrap: anywhere;
}

.email-control button {
  flex: 0 0 auto;
  padding: 0;
  color: var(--link);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.8rem;
}

.profile-location {
  margin: auto 0 0;
  padding-top: 2rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.content-panel {
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 2rem clamp(2rem, 3vw, 3.5rem);
  background: var(--surface);
}

.tab-nav,
.tab-panels,
.site-footer {
  width: min(100%, var(--content-width));
  margin-inline: auto;
}

.tab-nav {
  display: inline-flex;
  width: auto;
  margin-bottom: 2.75rem;
  padding: 0.3rem;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
}

.tab-nav button {
  min-width: 8rem;
  padding: 0.65rem 1.25rem;
  background: transparent;
  border: 0;
  border-radius: 0.3rem;
  cursor: pointer;
  font-size: 1rem;
}

.tab-nav button[aria-selected="true"] {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(23, 43, 66, 0.12);
  font-weight: 400;
}

.tab-panel {
  min-height: calc(100vh - 13rem);
}

.intro-line {
  margin-bottom: 1rem;
  color: var(--link);
  font-size: 1.05rem;
}

.content-section {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--line);
}

.content-section:first-of-type {
  padding-top: 0.5rem;
}

.content-section h2,
.panel-header h2 {
  margin-bottom: 1.25rem;
  font-size: 2.2rem;
}

.prose {
  max-width: 58rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.timeline {
  display: grid;
  gap: 1.25rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.25rem;
}

.timeline-date,
.project-meta time {
  color: var(--link);
  font-size: 0.94rem;
  font-weight: 400;
}

.timeline-item h3 {
  margin-bottom: 0.25rem;
  font-size: 1.12rem;
  font-weight: 500;
}

.timeline-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.interest-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 2rem;
  margin: 0;
  padding-left: 1.25rem;
}

.interest-list li::marker {
  color: var(--link);
}

.skills-list {
  margin: 0;
}

.skills-list > div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.skills-list > div:last-child {
  border-bottom: 0;
}

.skills-list dt {
  color: var(--ink);
  font-weight: 500;
}

.skills-list dd {
  margin: 0;
}

.news-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.25rem;
}

.news-list time {
  color: var(--link);
  font-size: 0.94rem;
  font-weight: 400;
}

.panel-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-dark);
}

.panel-header h2 {
  margin-bottom: 0.35rem;
}

.panel-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.publication-list {
  display: grid;
  gap: 0;
}

.publication-item {
  display: grid;
  grid-template-columns: minmax(220px, 34%) 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

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

.publication-image {
  align-self: start;
  padding: 0.65rem;
  background: #ffffff;
  border: 1px solid var(--line);
}

.publication-image:hover {
  border-color: var(--line-dark);
}

.publication-image img {
  width: 100%;
}

.publication-body h3 {
  margin-bottom: 0.65rem;
  font-size: 1.3rem;
  font-weight: 500;
}

.publication-summary {
  margin-bottom: 0.8rem;
}

.publication-authors,
.publication-venue {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.publication-authors strong {
  color: var(--ink);
  font-weight: 500;
}

.publication-venue {
  font-style: italic;
}

.item-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.85rem;
}

.item-links a {
  font-size: 0.94rem;
}

.project-list {
  border-top: 1px solid var(--line);
}

.project-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.project-meta span {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
}

.project-body h3 {
  margin-bottom: 0.65rem;
  font-size: 1.35rem;
  font-weight: 500;
}

.project-body p {
  margin-bottom: 0.65rem;
}

.project-body .project-result {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.project-body .item-links {
  margin-top: 0.65rem;
}

.project-impact {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--page);
  border-left: 3px solid var(--link);
  border-radius: 0 0.35rem 0.35rem 0;
}

.project-impact p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.project-impact strong {
  color: var(--ink);
  font-weight: 500;
}

.build-hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.build-card {
  display: grid;
  overflow: hidden;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
}

.build-card:hover {
  border-color: var(--line-dark);
  text-decoration: none;
}

.build-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--page);
}

.build-card-body {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding: 1rem;
}

.build-card h3 {
  margin-bottom: 0;
  font-size: 1.22rem;
  font-weight: 500;
}

.build-card-body > span {
  display: block;
  font-size: 0.95rem;
  line-height: 1.55;
}

.build-card-link {
  color: var(--link);
  font-weight: 400;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
  padding: 1.5rem 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

@media (min-width: 1500px) {
  :root {
    --sidebar-width: 420px;
  }

  .profile-inner {
    padding-inline: 3rem;
  }
}

@media (max-width: 900px) {
  html {
    font-size: 17px;
  }

  body {
    font-size: 1.05rem;
  }

  .site-layout {
    display: block;
  }

  .profile-panel {
    position: relative;
    width: 100%;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .profile-inner {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0.75rem 1.5rem;
    min-height: 0;
    padding: 1.5rem clamp(1.25rem, 5vw, 2.5rem);
  }

  .profile-photo {
    grid-row: 1 / span 3;
    width: 110px;
    margin: 0;
  }

  .profile-heading {
    text-align: left;
  }

  .profile-heading h1 {
    margin-bottom: 0.35rem;
    font-size: 1.8rem;
  }

  .profile-focus {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    text-align: left;
  }

  .profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .profile-links > a,
  .email-control {
    min-height: 2.35rem;
    padding-inline: 0.75rem;
  }

  .profile-location {
    display: none;
  }

  .content-panel {
    width: 100%;
    margin-left: 0;
    padding: 1.5rem clamp(1.25rem, 5vw, 2.5rem);
    overflow-x: hidden;
  }

  .tab-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    width: 100%;
    overflow-x: auto;
    margin-bottom: 2.5rem;
    background: rgba(243, 245, 247, 0.95);
    backdrop-filter: blur(10px);
  }

  .tab-nav button {
    flex: 0 0 auto;
    min-width: max-content;
    padding-inline: 1rem;
  }

  .build-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  html {
    font-size: 16px;
  }

  body {
    font-size: 1.05rem;
  }

  .content-panel {
    padding-inline: 1rem;
  }

  .profile-inner {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 0.65rem 1rem;
  }

  .profile-photo {
    width: 84px;
  }

  .profile-heading h1 {
    font-size: 1.55rem;
  }

  .profile-title {
    font-size: 0.86rem;
  }

  .profile-affiliation {
    font-size: 0.8rem;
    overflow-wrap: anywhere;
  }

  .profile-heading,
  .profile-title,
  .profile-affiliation,
  .content-panel,
  .tab-panels,
  .panel-header,
  .project-list,
  .project-item,
  .project-body,
  .project-impact,
  .build-hub,
  .build-card,
  .build-card-body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .profile-focus {
    display: none;
  }

  .profile-links {
    grid-column: 1 / -1;
    width: 100%;
  }

  .email-control {
    flex: 1 1 13rem;
  }

  .profile-links > a {
    flex: 1 1 6rem;
  }

  .tab-nav {
    margin-bottom: 2rem;
  }

  .tab-nav button {
    padding-inline: 0.5rem;
    font-size: 0.9rem;
  }

  .content-section h2,
  .panel-header h2 {
    font-size: 1.85rem;
  }

  .panel-header p {
    max-width: 100%;
    font-size: 0.98rem;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .build-card-body > span,
  .build-card h3 {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .timeline-item,
  .skills-list > div,
  .news-list li,
  .project-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .interest-list {
    grid-template-columns: 1fr;
  }

  .publication-item {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .publication-image {
    width: 100%;
  }

  .project-meta {
    flex-direction: row;
    justify-content: space-between;
  }

  .build-hub {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
    gap: 0.25rem;
  }
}

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