/* ============================================================================
   Rakshith Shetty — personal site
   Design adapted from the HTML5 UP "Read Only" layout (fixed left sidebar).
   Plain CSS, no build step. Edit content in content.js, not here.
   ============================================================================ */

:root {
  --sidebar-bg: #1f1815;
  --heading: #001f3f;
  --body: #4a4a4a;
  --muted: #6d6b6b;
  --primary: #181991;
  --accent: #ff9a08;
  --pill-bg: rgba(156, 202, 181, 0.52);
  --pill-bg-hover: rgba(156, 202, 181, 0.85);
  --border: #efefef;
  --card-shadow: 0 0.1em 0.15em 0 rgba(0, 0, 0, 0.15);
  --sidebar-w: 26%;
}

* { box-sizing: border-box; }

html { font-size: 15pt; }

body {
  margin: 0;
  font-family: "Source Sans Pro", Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--body);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  color: var(--heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.75em;
}
h2 { font-size: 1.5em; }
h3 { font-size: 1.2em; }

p { margin: 0 0 1em; }

a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dotted rgba(24, 25, 145, 0.4);
  transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
a:hover {
  color: var(--accent);
  border-bottom-color: transparent;
}

/* ===== Sidebar ====================================================== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100%;
  padding: 3em 2.5em;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  text-align: right;
  color: hsla(0, 0%, 100%, 0.6);
  background-color: var(--sidebar-bg);
  background-image: linear-gradient(rgba(31, 24, 21, 0.55), rgba(31, 24, 21, 0.55)), url("assets/overlay.png");
  background-size: auto, 256px 256px;
  overflow-y: auto;
}

#header .inner { width: 100%; }

#header .image.avatar {
  display: inline-block;
  border: 0;
  margin-bottom: 1.5em;
}
#header .image.avatar img {
  display: block;
  width: 9em;
  height: 9em;
  object-fit: cover;
  border-radius: 100%;
  box-shadow: var(--card-shadow);
}

#header h1 {
  color: #fff;
  font-size: 1.5em;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
}
#header h1 strong { font-weight: 600; }
#header h1 #subtitle { color: hsla(0, 0%, 100%, 0.6); }

/* sidebar footer social links */
.labeled-icons {
  list-style: none;
  margin: 1.5em 0 0;
  padding: 0;
  width: 100%;
}
.labeled-icons li { margin: 0.35em 0; }
.labeled-icons a {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: hsla(0, 0%, 100%, 0.6);
  border-bottom: none;
}
.labeled-icons a:hover { color: var(--accent); }
.labeled-icons svg {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

/* ===== Main ========================================================= */
#main {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  padding: 4em 5em 3em;
  max-width: 1100px;
}

section { margin: 0 0 4em; }

.major { margin: 0 0 1.5em; }
#intro-heading { font-size: 2em; }
#intro-body p:first-child { font-size: 1.1em; }

#research-intro { color: var(--muted); margin-bottom: 2em; }

/* ===== Cards (publications / projects) ============================== */
.cards { display: flex; flex-direction: column; gap: 1.75em; }

.card {
  display: flex;
  gap: 1.5em;
  align-items: flex-start;
  padding: 1.25em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.card-image {
  flex: none;
  width: 30%;
  max-width: 240px;
  border-radius: 6px;
  overflow: hidden;
}
.card-image img {
  display: block;
  width: 100%;
  height: auto;
}

.card-text { flex: 1; min-width: 0; }
.card-text h3 { margin: 0 0 0.3em; line-height: 1.3; }
.card-authors { color: var(--muted); margin: 0 0 0.2em; }
.card-venue { font-weight: 600; color: var(--heading); margin: 0 0 0.5em; }
.card-tldr { margin: 0 0 0.75em; }

.oral-tag {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.05em 0.5em;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: #d92626;
  border-radius: 3px;
  vertical-align: middle;
}

/* link pills + bibtex share one wrapping row */
.card-links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5em;
  margin-top: 0.25em;
}
.pill {
  display: inline-block;
  padding: 0.25em 0.85em;
  font-size: 0.9em;
  color: #14322a;
  background: var(--pill-bg);
  border-radius: 4px;
  border-bottom: none;
}
.pill:hover { color: #14322a; background: var(--pill-bg-hover); }

/* bibtex expander — sits inline with the pills, expands full-width when open */
.bibtex {
  font-size: 0.9em;
}
.bibtex[open] { flex-basis: 100%; }
.bibtex > summary {
  display: inline-block;
  cursor: pointer;
  list-style: none;
  padding: 0.25em 0.85em;
  color: var(--primary);
  background: #f3f4fa;
  border-radius: 4px;
  user-select: none;
}
.bibtex > summary::-webkit-details-marker { display: none; }
.bibtex > summary:hover { color: var(--accent); }
.bibtex pre {
  margin: 0.6em 0 0;
  padding: 1em;
  overflow-x: auto;
  font-family: Consolas, Menlo, Courier, monospace;
  font-size: 0.85em;
  line-height: 1.5;
  color: #333;
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* ===== Page footer ================================================== */
#page-footer {
  margin: 3em 0 0;
  padding-top: 1.5em;
  border-top: 1px solid var(--border);
}
.copyright {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.85em;
}
.copyright li {
  display: inline-block;
  margin-right: 1.25em;
}

/* ===== Responsive =================================================== */
@media (max-width: 1280px) {
  :root { --sidebar-w: 30%; }
  #main { padding: 3.5em 3em 2.5em; }
}

@media (max-width: 980px) {
  /* sidebar becomes a top header */
  #header {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3em 2em;
  }
  #header .image.avatar { margin-bottom: 1em; }
  .labeled-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4em 1.4em;
  }
  .labeled-icons li { margin: 0; }
  #main {
    margin-left: 0;
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    padding: 3em 2.5em;
  }
}

@media (max-width: 736px) {
  html { font-size: 13pt; }
  .card { flex-direction: column; }
  .card-image { width: 100%; max-width: 100%; }
  #main { padding: 2.5em 1.5em; }
}
