/* samirgrover.ai — karpathy.ai-matched styling, pure CSS, 0 frameworks */

* { margin: 0; padding: 0; box-sizing: border-box; }

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

a { color: inherit; }
a:hover { text-decoration: underline; }

.container {
  width: 970px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 15px;
}

/* — Header — */
#dhead {
  margin-top: 20px;
}

#dhead .row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

#dpic {
  flex-shrink: 0;
}

.ppic {
  width: 220px;
  height: 220px;
  border-radius: 110px;
  object-fit: cover;
  object-position: center center;
}

#ddesc {
  padding-top: 0;
}

#ddesc h1 {
  font-size: 34px;
  font-weight: normal;
}

#ddesc h2 {
  font-size: 18px;
  font-weight: normal;
  font-style: italic;
  color: #999;
  max-width: 360px;
}

#dico {
  margin-top: 10px;
}

#dico img, #dico svg {
  width: 30px;
  height: 30px;
  margin-right: 5px;
  fill: #555;
  vertical-align: middle;
}

#dico a {
  text-decoration: none;
  display: inline-block;
}

#dico a:hover svg {
  fill: #111;
}

#demail {
  font-size: 14px;
  color: #555;
  margin-top: 6px;
  opacity: 0;
  transition: opacity 0.7s;
}

#demail.shown {
  opacity: 1;
}

/* — HR — */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, #fff, #ccc, #fff);
  margin: 20px 0;
}

/* — Section Titles — */
.ctitle {
  font-size: 36px;
  margin-bottom: 20px;
  margin-top: 40px;
}

/* — Timeline — */
#history .entry {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  padding: 6px 0;
}

#history .entry .timespan {
  grid-column: span 2;
  font-size: 14px;
  color: #bbb;
  padding-top: 4px;
  margin-left: -20px;
}

#history .entry .ico {
  grid-column: span 1;
  position: relative;
  display: flex;
  align-items: flex-start;
  padding-top: 4px;
}

#history .entry .ico::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #cfcfcf;
}

.entry-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: #cfcfcf;
  position: relative;
  z-index: 1;
}

#history .entry .ico img {
  max-width: 80px;
  border-radius: 5px;
  margin-left: 10px;
  position: relative;
  z-index: 1;
}

#history .entry .desc {
  grid-column: span 9;
  font-size: 17px;
  padding-bottom: 12px;
}

#history .entry .desc {
  grid-column: span 9;
  font-size: 17px;
  padding-bottom: 12px;
}

/* — Bio paragraph — */
#bio p {
  font-size: 16px;
  line-height: 1.5;
}

/* — Thesis box — */
#thesis {
  background: #f8fafb;
  border-left: 3px solid #1a6b8a;
  padding: 20px 24px;
  margin: 20px 0 10px 0;
  border-radius: 0 6px 6px 0;
}

#thesis p {
  font-size: 16px;
  line-height: 1.5;
}

#thesis p + p {
  margin-top: 10px;
}

/* — Writing (no gray bg) — */
.wlist {
  list-style: none;
  padding: 0;
}

.wlist li {
  padding: 4px 0;
  font-size: 16px;
}

.wvenue {
  font-size: 14px;
  color: #999;
}

/* — Gray background sections — */
.gray-bg {
  background-color: #eee;
  padding-top: 1px;
  margin-top: 10px;
}

/* — Teaching / Programs — */
.prog {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.prog:last-child {
  border-bottom: none;
}

.prog .ptitle {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 3px;
}

.prog .pdesc {
  font-size: 15px;
  color: #555;
  line-height: 1.45;
}

/* — Publications — */
.pub {
  padding: 6px 0 6px 14px;
  border-left: 4px solid #aaa;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.pub .pub-title a {
  text-decoration: none;
}

.pub .pub-title a:hover {
  text-decoration: underline;
}

.pub .pub-venue {
  color: #090;
  font-size: 13px;
}

.pub .pub-authors {
  color: #888;
  font-size: 13px;
}

/* — Misc — */
.misc-list {
  padding-left: 20px;
}

.misc-list li {
  padding: 3px 0;
  font-size: 16px;
}

/* — Responsive — */
@media (max-width: 991px) {
  .container {
    width: auto;
    padding: 0 15px;
  }

  #dhead .row {
    flex-direction: column;
    text-align: center;
  }

  #dpic {
    margin-bottom: 16px;
  }

  #ddesc {
    text-align: center;
  }

  #ddesc h2 {
    max-width: 100%;
  }

  #history .entry .ico {
    display: none;
  }

  #history .entry .timespan {
    grid-column: span 3;
  }

  #history .entry .desc {
    grid-column: span 9;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .ppic {
    width: 160px;
    height: 160px;
    border-radius: 80px;
  }

  #history .entry .desc {
    font-size: 14px;
  }

  .ctitle {
    font-size: 28px;
  }
}
