/* ===========================
   Shakti Singh — Personal Site
   Karpathy-TRUE-style: minimal, spacious, high density
   =========================== */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Helvetica Neue, Helvetica, Arial, sans-serif;
  color: #313131;
  background: #fff;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

a {
  color: #1a0dab;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

hr {
  border: none;
  border-top: 1px solid #eeeeee;
  margin: 40px 0;
}

/* ---- Layout ---- */
.container {
  max-width: 760px;
  /* More compact */
  margin: 0 auto;
  padding: 0 20px;
}

.row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* ---- Header ---- */
#dhead {
  padding: 60px 0 30px;
}

#dpic {
  width: 150px;
  height: 150px;
  margin-right: 35px;
  flex-shrink: 0;
}

.ppic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 1px solid #ddd;
}

#ddesc h1 {
  font-size: 40px;
  font-weight: 600;
  margin: 0 0 8px 0;
  letter-spacing: -1.2px;
  color: #000;
}

#ddesc h2 {
  font-size: 18px;
  font-weight: 400;
  color: #777;
  margin: 0 0 20px 0;
  font-style: italic;
}

/* ---- Social icons ---- */
#dico {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.iico {
  width: 32px;
  height: 32px;
  background-color: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  padding: 8px;
}

.iico:hover {
  background-color: #000;
}

.iico svg {
  width: 100%;
  height: 100%;
  fill: #fff;
  /* Icons are white on dark circles */
  display: block;
}

#demail {
  font-size: 13px;
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.25s;
  color: #666;
}

/* ---- Bio ---- */
#bio {
  padding: 30px 0 45px;
  font-size: 16px;
  color: #333;
  line-height: 1.6;
}

/* ---- Section titles ---- */
.ctitle {
  font-size: 21px;
  font-weight: 500;
  margin-top: 60px;
  margin-bottom: 25px;
  color: #000;
  text-transform: lowercase;
}

/* ---- History Timeline ---- */
#history {
  margin-top: 40px;
}

.timespan {
  width: 120px;
  flex-shrink: 0;
  font-size: 14px;
  color: #bbb;
  text-align: right;
}

.entry {
  display: flex;
  margin-bottom: 25px;
  /* Shrunk from 35px */
  align-items: center;
}

.ico {
  width: 45px;
  height: 45px;
  margin: 0 25px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ico-dark {
  background-color: #222;
  border-radius: 8px;
  padding: 5px;
}

.ico img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.entry-dot {
  width: 10px;
  height: 10px;
  background-color: #ddd;
  border-radius: 50%;
  z-index: 2;
  margin-top: 8px;
}

/* The vertical line in timeline */
#history::before {
  content: '';
  position: absolute;
  left: 179px;
  /* Adjust to align with dots */
  width: 1px;
  height: 500px;
  /* Approximate or use JS for full height */
  background-color: #eee;
  z-index: 1;
}

.entry .desc {
  flex-grow: 1;
  font-size: 14px;
  /* Shrunk from 15px */
  color: #333;
}

/* ---- Cards (Featured talks/projects) ---- */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  width: 100%;
  /* Let the grid determine the width */
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.ccimg {
  width: 100%;
  background: #f0f0f0;
}

.ccimg img {
  width: 100%;
  display: block;
}

.cdesc {
  padding: 10px;
  font-size: 13px;
  color: #333;
  text-align: center;
}

/* ---- Pet Projects list ---- */
.project {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
  /* Shrunk from 30px */
  gap: 15px;
}

.pico {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  background: #f8f8f8;
  border-radius: 4px;
  overflow: hidden;
}

.pico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdesc {
  flex-grow: 1;
  font-size: 15px;
  /* Shrunk from 17px */
  line-height: 1.6;
}

/* ---- Code Blocks & Typography ---- */
pre {
  background: #fcfcfc;
  border: 1px solid #eee;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 25px 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 14px;
  color: #d63384;
  /* Subtle code pink */
}

pre code {
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

/* ---- Generic lists ---- */
ul.nodot {
  list-style: none;
  padding-left: 0;
}

ul.nodot li {
  margin-bottom: 10px;
}

/* ---- Responsive ---- */
@media (max-width: 700px) {
  .row {
    flex-direction: column;
    text-align: center;
  }

  #dpic {
    margin-right: 0;
    margin-bottom: 20px;
  }

  .timespan {
    display: none;
  }

  #history::before {
    display: none;
  }

  .card {
    width: 100%;
  }
}