/* ==========================================================================
   style.css — Rishav Gupta personal academic website
   Design inspired by Chelsea Finn (ai.stanford.edu/~cbfinn/)
   ========================================================================== */


/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  line-height: 1.5;
}


/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  color: #c05c0a;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 2px solid #c05c0a;
}

p {
  margin-bottom: 12px;
}

a {
  color: #1772d0;
  text-decoration: none;
}

a:hover {
  color: #0d5aab;
  text-decoration: underline;
}

ul {
  list-style: none;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}


/* ==========================================================================
   LAYOUT — centered single column
   ========================================================================== */

.container {
  max-width: 850px;
  margin: 0 auto;
  padding: 40px 20px;
}

section {
  margin-top: 40px;
}


/* ==========================================================================
   HEADER — two-column: photo left, info right
   ========================================================================== */

.site-header {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.header-photo {
  flex: 0 0 190px;
}

.header-photo img {
  width: 190px;
  display: block;
  border-radius: 6px;
}

/* Shown when image file isn't present yet */
.photo-placeholder {
  width: 190px;
  height: 240px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 14px;
  border-radius: 6px;
  border: 1px dashed #ccc;
}

.header-info {
  flex: 1;
  padding-top: 4px;
}

.header-info .title {
  font-size: 17px;
  color: #333;
  margin-bottom: 2px;
}

.header-info .affiliation {
  font-size: 15px;
  color: #555;
  margin-bottom: 2px;
}

.header-info .advisor {
  font-size: 15px;
  color: #555;
  margin-bottom: 12px;
}

/* Contact link pill badges */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  font-size: 14px;
  color: #1772d0;
  border: 1px solid #c8d8f0;
  border-radius: 20px;
  background: #f4f8ff;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.contact-links a:hover {
  background: #ddeafc;
  border-color: #1772d0;
  text-decoration: none;
}


/* ==========================================================================
   NEWS SECTION
   ========================================================================== */

.news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
}

.news-date {
  flex-shrink: 0;
  padding: 1px 9px;
  font-size: 12px;
  font-weight: 600;
  color: #c05c0a;
  background: #fff4ec;
  border: 1px solid #f0c8a0;
  border-radius: 12px;
  white-space: nowrap;
}

.news-text {
  line-height: 1.5;
}


/* ==========================================================================
   RESEARCH SECTION
   ========================================================================== */

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.research-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-left: 4px solid #c05c0a;
  border-radius: 6px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.research-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.research-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #fff4ec;
  border-radius: 50%;
  color: #c05c0a;
  font-size: 14px;
  flex-shrink: 0;
}

.research-card-title {
  font-weight: 700;
  font-size: 15px;
  color: #1a1a1a;
  line-height: 1.3;
}

.research-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .research-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   PUBLICATIONS SECTION
   ========================================================================== */

.pub-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.15s;
}

.pub-row:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.09);
}

.pub-thumb {
  flex: 0 0 130px;
}

.pub-thumb img {
  width: 130px;
  display: block;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

/* Shown when thumbnail isn't present yet */
.thumb-placeholder {
  width: 130px;
  height: 90px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 12px;
  border-radius: 4px;
  border: 1px dashed #ccc;
  text-align: center;
  padding: 4px;
}

.pub-info {
  flex: 1;
}

.pub-title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 15px;
}

.pub-authors {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.pub-venue {
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.venue-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.venue-badge.accepted {
  background: #eaf4ea;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.venue-badge.review {
  background: #f0f4ff;
  color: #1a56c4;
  border: 1px solid #bad0f8;
}

.venue-badge.under-review {
  background: #fff8ec;
  color: #b45309;
  border: 1px solid #fcd29b;
}

.pub-links {
  font-size: 14px;
  margin-bottom: 0;
}

.pub-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 10px;
  color: #1772d0;
}


/* ==========================================================================
   SHARED ENTRY LIST — used by Experience, Education, Awards
   ========================================================================== */

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.entry-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #eeeeee;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.15s;
}

.entry-item:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.09);
}

.entry-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff4ec;
  border-radius: 50%;
  color: #c05c0a;
  font-size: 15px;
  margin-top: 2px;
}

.award-icon {
  background: #fff4ec;
  color: #c05c0a;
}

.entry-body {
  flex: 1;
}

.entry-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.entry-title {
  font-weight: 700;
  font-size: 15px;
  color: #1a1a1a;
}

.entry-sub {
  font-size: 14px;
  color: #555;
  margin-top: 3px;
}

.entry-meta {
  font-size: 13px;
  color: #888;
  margin-top: 3px;
}

.exp-duration {
  display: inline-block;
  padding: 1px 9px;
  font-size: 12px;
  font-weight: 600;
  color: #c05c0a;
  background: #fff4ec;
  border: 1px solid #f0c8a0;
  border-radius: 12px;
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
  color: #888;
  text-align: center;
}


/* ==========================================================================
   RESPONSIVE — mobile (< 640px)
   ========================================================================== */

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 24px 16px;
  }

  /* Stack header photo above name/info */
  .site-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-photo {
    flex: none;
  }

  .contact-links {
    justify-content: center;
  }

  /* Stack publication thumbnails above text */
  .pub-row {
    flex-direction: column;
  }

  .pub-thumb {
    flex: none;
  }

  .pub-thumb img,
  .thumb-placeholder {
    width: 100%;
    max-width: 260px;
    height: auto;
  }

  .news-date {
    display: block;
    margin-bottom: 2px;
  }
}
