:root {
  color-scheme: light;
  --bg: #f3efe8;
  --bg-strong: #faf8f4;
  --panel: rgba(255, 253, 249, 0.94);
  --panel-strong: #fffdf9;
  --border: rgba(203, 194, 179, 0.76);
  --border-strong: rgba(185, 173, 156, 0.9);
  --ink: #17191c;
  --muted: #62665f;
  --accent: #4f955c;
  --accent-strong: #3f7d4d;
  --accent-soft: #edf5ee;
  --terminal-bg: #faf4ed;
  --terminal-bg-strong: #fffaf3;
  --terminal-border: #cecacd;
  --terminal-ink: #2a2d29;
  --terminal-muted: #6b7068;
  --terminal-accent: #3f7d4d;
  --shadow: 0 18px 44px rgba(18, 20, 21, 0.08);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Baskerville, Georgia, serif;
  --mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  --content-main-col: minmax(0, 1.75fr);
  --content-side-col: minmax(300px, 0.82fr);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-strong) 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: var(--mono);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 16px auto 28px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px 18px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.brand-prompt {
  color: var(--accent);
  font-weight: 700;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.topnav a {
  color: var(--accent);
  font-size: 0.95rem;
}

.page-grid {
  display: grid;
  grid-template-columns: var(--content-main-col) var(--content-side-col);
  gap: 18px;
  padding-top: 16px;
}

.panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-strong) 0%, var(--panel) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 8px 22px rgba(20, 22, 22, 0.04);
}

.hero-card {
  min-height: 520px;
  overflow: hidden;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.9fr);
  gap: 40px;
  padding: 34px 38px 40px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.kicker,
.section-heading,
.roles-heading {
  margin: 0;
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.hero-name {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 7.5vw, 6.9rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 500;
}

.hero-name span {
  display: block;
}

.hero-subtitle {
  margin: 0;
  color: var(--accent-strong);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.25;
}

.hero-intro {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.85;
}

.roles {
  max-width: 32rem;
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.roles-heading {
  margin-bottom: 14px;
}

.roles-list {
  display: grid;
  gap: 12px;
}

.role-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: baseline;
  color: var(--muted);
}

.role-title {
  color: var(--ink);
}

.role-org {
  color: var(--accent);
  text-align: left;
  white-space: nowrap;
}

.hero-image-frame {
  position: relative;
  align-self: start;
  max-width: 360px;
  margin-top: 36px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 34px rgba(21, 24, 25, 0.1);
}

.hero-image-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.terminal-card {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  background: linear-gradient(180deg, var(--terminal-bg) 0%, var(--terminal-bg-strong) 100%);
  color: var(--terminal-ink);
  border-color: var(--terminal-border);
  overflow: hidden;
  box-shadow:
    0 16px 34px rgba(87, 82, 121, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 10px;
  color: var(--terminal-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(206, 202, 205, 0.9);
  background: rgba(255, 255, 255, 0.4);
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #dfdad9;
}

.terminal-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 14px;
  padding: 8px 20px 22px;
  background: transparent;
}

.terminal-screen {
  display: flex;
  flex: 1 1 auto;
  min-height: 360px;
  flex-direction: column;
  overflow: auto;
  padding-right: 4px;
  scroll-behavior: auto;
}

.terminal-transcript {
  display: grid;
  gap: 10px;
}

.terminal-entry {
  display: grid;
  gap: 3px;
}

.terminal-command {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--terminal-accent);
  font-weight: 700;
  line-height: 1.45;
  tab-size: 4;
}

.terminal-line {
  color: var(--terminal-ink);
  font-size: 0.97rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 4;
}

.terminal-line-muted {
  color: var(--terminal-muted);
}

.terminal-line-accent {
  color: var(--terminal-accent);
}

.terminal-line + .terminal-line {
  margin-top: -1px;
}

.terminal-input-row {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 10px;
  min-height: 1.5em;
  cursor: text;
}

.terminal-shell-prompt {
  display: inline-flex;
  align-items: flex-end;
  color: var(--terminal-accent);
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.45;
}

.terminal-live-command {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 1.45em;
  color: var(--terminal-ink);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 4;
}

.terminal-caret {
  display: inline-block;
  width: 0.56em;
  height: 0.82em;
  margin-left: 1px;
  transform: translateY(0.28em);
  background: var(--terminal-accent);
  animation: terminal-caret-blink 1.05s steps(1, end) infinite;
}

.terminal-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font: inherit;
  font-size: 1rem;
  outline: none;
  opacity: 0;
  pointer-events: none;
}

.terminal-input::placeholder {
  color: rgba(168, 173, 159, 0.62);
}

@keyframes terminal-caret-blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.terminal-screen::-webkit-scrollbar {
  width: 10px;
}

.terminal-screen::-webkit-scrollbar-track {
  background: transparent;
}

.terminal-screen::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(121, 117, 147, 0.22);
  background-clip: padding-box;
}

.content-grid {
  display: grid;
  grid-template-columns: var(--content-main-col) var(--content-side-col);
  gap: 18px;
  grid-column: 1 / -1;
  align-items: start;
}

.stack {
  display: grid;
  gap: 18px;
  align-self: start;
}

.panel-body {
  padding: 18px 22px 22px;
}

.section-heading {
  padding: 16px 22px 0;
}

.section-subtext {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.publications-body {
  padding-top: 12px;
}

.full-publications {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.full-publications tr {
  border-bottom: 1px solid rgba(201, 190, 169, 0.45);
}

.full-publications tr:last-child {
  border-bottom: none;
}

.full-publications td {
  padding: 18px 0;
  vertical-align: top;
}

.full-publications .bibtexnumber {
  width: 64px;
  padding-right: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.full-publications .bibtexnumber a {
  color: inherit;
}

.full-publications .bibtexitem {
  min-width: 0;
  color: var(--muted);
  line-height: 1.68;
}

.full-publications .paper-authors {
  color: var(--muted);
  font-size: 0.9rem;
}

.full-publications .paper-title {
  margin-top: 4px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

.full-publications .paper-venue {
  margin-top: 6px;
  color: var(--accent);
  font-size: 0.93rem;
  line-height: 1.65;
}

.full-publications .paper-links {
  margin-top: 8px;
  font-size: 0.88rem;
}

.full-publications .paper-links a {
  color: var(--accent);
}

.pub-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.93rem;
}

.pub-table thead {
  color: var(--accent);
}

.pub-table th,
.pub-table td {
  padding: 8px 0;
  border-bottom: 1px solid rgba(201, 190, 169, 0.45);
  text-align: left;
  vertical-align: top;
}

.pub-table tbody tr:last-child td {
  border-bottom: none;
}

.pub-year {
  width: 58px;
  color: var(--muted);
}

.pub-venue {
  width: 120px;
  color: var(--accent);
}

.pub-title a {
  color: inherit;
}

.card-link {
  margin-top: 18px;
  color: var(--accent);
  font-size: 0.94rem;
}

.card-link a {
  color: inherit;
}

.student-groups {
  display: grid;
  gap: 16px;
}

.student-group {
  display: grid;
  gap: 10px;
}

.student-group-title {
  color: var(--accent);
  font-size: 0.95rem;
}

.student-list {
  display: grid;
  gap: 10px;
}

.student-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(201, 190, 169, 0.6);
}

.student-list .student-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.student-name {
  color: var(--ink);
}

.student-detail {
  color: var(--muted);
  text-align: right;
  max-width: 220px;
  white-space: normal;
}

.writing-list,
.links-list {
  display: grid;
  gap: 14px;
  margin: 10px 0 0;
}

.writing-item,
.links-item {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(201, 190, 169, 0.6);
}

.writing-list .writing-item:last-child,
.links-list .links-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.writing-title,
.links-title {
  color: var(--ink);
  line-height: 1.5;
}

.writing-meta,
.links-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

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

@media (max-width: 1180px) {
  .page-grid,
  .content-grid,
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-image-frame {
    max-width: 420px;
    margin-top: 0;
  }
}

@media (max-width: 820px) {
  .site-shell {
    width: min(100% - 18px, 1440px);
    margin: 9px auto;
    padding: 10px;
    border-radius: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 8px 10px 14px;
  }

  .topnav {
    justify-content: flex-start;
  }

  .hero-layout {
    padding: 24px 22px 28px;
    gap: 22px;
  }

  .panel-body {
    padding: 16px 18px 18px;
  }

  .section-heading {
    padding: 14px 18px 0;
  }

  .terminal-card {
    min-height: 460px;
  }

  .terminal-screen {
    min-height: 280px;
  }

  .role-row,
  .student-row {
    grid-template-columns: 1fr;
  }

  .student-detail {
    text-align: left;
    max-width: none;
  }

  .pub-table {
    font-size: 0.88rem;
  }

  .pub-venue {
    width: 96px;
  }
}

@media (max-width: 640px) {
  .full-publications,
  .full-publications tbody,
  .full-publications tr,
  .full-publications td {
    display: block;
    width: 100%;
  }

  .full-publications tr {
    padding: 14px 0;
  }

  .full-publications td {
    padding: 0;
  }

  .full-publications .bibtexnumber {
    width: auto;
    padding: 0 0 8px;
  }

  .hero-name {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero-intro {
    font-size: 0.98rem;
    line-height: 1.72;
  }

  .topnav {
    gap: 8px 14px;
  }

  .pub-table,
  .pub-table thead,
  .pub-table tbody,
  .pub-table tr,
  .pub-table th,
  .pub-table td {
    display: block;
  }

  .pub-table thead {
    display: none;
  }

  .pub-table tbody tr {
    padding: 12px 0;
    border-bottom: 1px solid rgba(201, 190, 169, 0.45);
  }

  .pub-table tbody tr:last-child {
    border-bottom: none;
  }

  .pub-table td {
    border-bottom: none;
    padding: 2px 0;
  }

  .pub-year,
  .pub-venue {
    width: auto;
  }
}
