/* Layout cloned from karpathy.ai — same stack as karpathy.ai/style.css (generic sans-serif, no webfonts) */
html {
  font-family: sans-serif;
  font-size: 15px;
}

body {
  margin: 0;
  padding: 0;
  background-color: white;
  font-family: sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: #333;
}

a {
  color: #0645ad;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}

@media (min-width: 992px) {
  .container {
    width: 970px;
  }
}

.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

/* Equal vertical spacing between timeline milestones */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.timeline .desc {
  padding-bottom: 0;
}

/* Header: photo + text side by side */
#dhead {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 18px;
  margin-top: 20px;
  padding-bottom: 40px;
  flex-wrap: wrap;
}

#dpic {
  flex: 0 0 auto;
  text-align: left;
}

#ddesc {
  flex: 1 1 280px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

@media (max-width: 991px) {
  #dhead {
    align-items: flex-start;
  }
}

h1 {
  font-size: 15px;
  font-weight: normal;
  padding: 0;
  margin: 0;
}

/* Homepage name only: monospace “coding” feel */
#ddesc h1 {
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #222;
}

h2 {
  font-weight: normal;
  font-style: italic;
  color: #999;
  font-size: 15px;
  padding: 0;
  margin: 5px 0 10px 0;
}

@media (min-width: 992px) {
  h2 {
    max-width: 420px;
  }
}

/* 240px × 0.85 ≈ 204px; square with rounded corners */
#dpic img {
  width: 204px;
  height: 204px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

.iico {
  width: 40px;
  height: 40px;
}

#dlinks {
  margin-top: 12px;
  font-size: 15px;
  color: #555;
}

#dlinks a {
  margin-right: 6px;
}

hr {
  height: 1px;
  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  background-image: -ms-linear-gradient(left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  padding: 0;
  margin: 0 0 44px 0;
  border: 0;
}

.ico {
  grid-column: span 1;
  vertical-align: top;
  border-left: 2px solid #cfcfcf;
  position: relative;
}

.ico img {
  border-radius: 5px;
  width: 100%;
  max-width: 80px;
  margin-left: 10px;
}

/* Stacked logos in timeline (current row may list multiple affiliations) */
.ico-logos {
  margin-left: 10px;
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.ico-logos a {
  display: block;
  line-height: 0;
}

.ico-logos img {
  margin-left: 0;
  max-width: 88px;
  max-height: 52px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #eee;
  background: #fff;
}

.desc {
  grid-column: span 10;
  vertical-align: top;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  padding-left: 20px;
  padding-bottom: 20px;
}

.entry-dot {
  position: absolute;
  top: 0;
  left: -8px;
  width: 10px;
  height: 10px;
  border-radius: 7px;
  background-color: #cfcfcf;
  border: 2px solid white;
}

.timespan {
  grid-column: span 1;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.38);
  text-align: right;
  padding-right: 5px;
  font-variant-numeric: tabular-nums;
}

.hassets {
  position: relative;
}

@media (max-width: 991px) {
  .hassets {
    display: none;
  }
}

.hasset {
  position: absolute;
  margin: 0;
  padding: 0;
}

.ctitle {
  font-family: sans-serif;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: normal;
  color: #222;
  margin-bottom: 14px;
  margin-top: 36px;
  display: inline-block;
  background-color: #ffffd0;
  padding: 3px 8px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

#pet-projects .row {
  grid-column-gap: 10px;
  grid-row-gap: 10px;
}

.project {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.pico {
  float: left;
  margin-right: 14px;
  position: relative;
  z-index: 0;
}

.pico:hover {
  z-index: 3;
}

.pend {
  clear: both;
}

/* Pet projects + publications: slightly larger thumbs, dramatic hover “pop” (image not wrapped in links) */
#pet-projects .pico img,
#publications .pico img {
  height: 88px;
  width: auto;
  max-width: 150px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  border: 1px solid #999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform-origin: 50% 50%;
}

#pet-projects .pico:hover img,
#publications .pico:hover img {
  transform: scale(1.15) translateY(-8px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3), 0 6px 14px rgba(0, 0, 0, 0.12);
}

#publications .pdesc {
  font-size: 15px;
}

.pub-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

a.pub-pill {
  display: inline-block;
  font-size: 12px;
  padding: 4px 11px;
  border: 1px solid #c8c8c8;
  border-radius: 5px;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  color: #222;
  text-decoration: none;
}

a.pub-pill:hover {
  background: #e8e8e8;
  border-color: #999;
  color: #0645ad;
  font-size: 13px;

}

.pub-venue {
  display: inline;
  color: #090;
}

.pub-authors {
  display: block;
  color: #333;
  font-size: 13px;

}

.tul {
  text-align: center;
  padding: 0;
}

.til {
  display: inline-block;
  padding: 3px 15px 3px 15px;
  margin-bottom: 5px;
}

.tilb {
  border-right: 1px solid #ccc;
}

.nodot {
  list-style-type: none;
  padding-left: 0;
}

.lead {
  font-size: 15px;
  margin: 0 0 16px 0;
}

.footer-note {
  font-size: 15px;
  color: #666;
  margin-top: 48px;
  padding-bottom: 32px;
}
