@import "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap";

/* =======================================
   Root variables and base styles
======================================= */
:root {
  --bg: #fff;
  --ink: #515151;
  --muted: #666;
  --accent: #C41230;
  --font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: var(--accent);
  text-decoration: none;
}



h3 {
  color: #C41230;
  margin-bottom: 0;
}
/* =======================================
   Sidebar
======================================= */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: clamp(15rem, 20vw, 14rem);
  padding: 2rem 1rem;
  text-align: center;
  background: #202020;
  color: #ffffff80;
}

.sidebar ul,
.social-links,
.publication-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar a,
.social-links a {
  color: #fff;
  text-decoration: none;
}

.sidebar a:hover,
.social-links a:hover {
  color: #f58025;
}

.avatar {
  display: block;
  margin: 0 auto 1.5rem;
  width: 90%;
  height: auto;
  border-radius: 12px;
}

.brand {
  margin: 0;
  padding-bottom: 1.5rem;
  color: #fff;
  font: 400 2rem/1 Arial, serif;
  text-align: center;
}

.social-links {
  font-size: 14px;
  text-align: center;
  margin: 0;
  margin-top: 0.75rem !important;
  margin-bottom: 1.5rem;
}

.social-links li {
  display: inline;
  padding: 0 2px;
  line-height: 0;
}

.social-links i {
  margin-right: 1px;
  font-size: 2.2rem !important;
}

.sep {
  width: 85%;
  margin: 1.5rem auto;
  border: 0;
  border-top: 1px solid rgba(138, 138, 138, 0.125);
  display: block;
}

.vnav {
  list-style: none;
  padding: 0;
  text-align: center;
  font-size: 1.5rem;
}

.vnav li {
  margin-bottom: 0.4rem;
}

.vnav a {
  display: block;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 300;
  transition: color 0.2s ease;
}

.vnav a.active {
  color: #f58025;
}

/* =======================================
   Layout wrappers
======================================= */
.wrap {
  min-height: 100vh;
}

.content {
  max-width: 60rem;
  margin-left: clamp(22rem, 22vw, 16rem);
  margin-right: 2rem;
  padding: 2rem 2rem 4rem;
}

.content h2 {
  margin: 0;
  padding-top: 0.5rem;
}

.content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* =======================================
   Cards
======================================= */
.card {
  font-style: normal;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px #0000001a;
  border-color: #d0d7de;
}

.card > :first-child {
  flex: 1;
  min-width: 0;
}

.card h2,
.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.author a {
  color: #a94108;
}
.author a:hover {
  text-decoration: underline;
}

.award {
  color: #C41230;
}
.description {
  font-size: 15px;
  color: #000000
}

/* =======================================
   Media blocks (right aligned)
======================================= */
.right-media {
  flex-shrink: 0;
  width: 30%;
  /* height: 140px; */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #e1e5e9;
  /* border-radius: 12px; */
}

.research-card .right-media {
  width: 180px;
  height: 180px;
}

.right-media img,
.right-media video {
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  margin: -1px;
  border-radius: 12px;
}

/* =======================================
   Modal
======================================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #00000080;
}

.modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 0;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 10px 25px #0000004d;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
  margin: 0;
  color: #24292f;
}

.close {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  color: #656d76;
}

.close:hover {
  color: #24292f;
}

.citation-text {
  margin: 1.5rem;
  padding: 1rem;
  background: #f6f8fa;
  border: 1px solid #d1d9e0;
  border-radius: 6px;
  font: 400 0.9rem/1.4 SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
  overflow-x: auto;
}

.modal-footer {
  padding: 1.5rem;
  text-align: right;
  border-top: 1px solid #e9ecef;
}

.copy-btn {
  background: #0969da;
  color: #fff;
  border: 0;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

.copy-btn:hover {
  background: #0860ca;
}

.copy-btn.copied {
  background: #1a7f37;
}

/* =======================================
   Publication links (badges)
======================================= */
.pub-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: #656d76;
  background: #f6f8fa;
  border: 1px solid #d1d9e0;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  margin-top: 0.3rem;
}

.pub-link:hover {
  background: #f3f4f6;
  border-color: #c9d1d9;
  text-decoration: none;
  color: #24292f;
}

/* Color presets via CSS variables */
.pub-link-code {
  --link-color: #7c3aed;
  --link-bg: #ede9fe;
  --link-border: #c4b5fd;
  --link-hover-color: #6d28d9;
  --link-hover-bg: #ddd6fe;
  --link-hover-border: #a78bfa;
}

.pub-link-website {
  --link-color: #92400e;
  --link-bg: #fef3c7;
  --link-border: #fcd34d;
  --link-hover-color: #78350f;
  --link-hover-bg: #fde68a;
  --link-hover-border: #f59e0b;
}

.pub-link-slides {
  --link-color: #ea580c;
  --link-bg: #f8d9b6;
  --link-border: #fdba74;
  --link-hover-color: #c2410c;
  --link-hover-bg: #fdba74;
  --link-hover-border: #fb923c;
}

.pub-link-venue {
  --link-color: #C41230;
  --link-bg: #fbe8eb;
  --link-border: #e594a1;
  --link-hover-color: #d60628;
  --link-hover-bg: #f7cbd1;
  --link-hover-border: #f47a8e;
}

.pub-link-cite {
  --link-color: #6b7280;
  --link-bg: #f9fafb;
  --link-border: #d1d5db;
  --link-hover-color: #4b5563;
  --link-hover-bg: #f3f4f6;
  --link-hover-border: #9ca3af;
}

/* Apply the color presets to badges */
.pub-link-code,
.pub-link-website,
.pub-link-slides,
.pub-link-venue,
.pub-link-cite {
  color: var(--link-color);
  background: var(--link-bg);
  border-color: var(--link-border);
}

.pub-link-code:hover,
.pub-link-website:hover,
.pub-link-slides:hover,
.pub-link-venue:hover,
.pub-link-cite:hover {
  color: var(--link-hover-color);
  background: var(--link-hover-bg);
  border-color: var(--link-hover-border);
}

/* =======================================
   Back to top button
======================================= */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #f58025;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 100;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #e0701f;
  transform: translateY(-2px);
}

/* =======================================
   Responsive (≤ 1024px)
======================================= */
@media (max-width: 1024px) {
  body {
    overflow-x: hidden;
  }

  .wrap {
    min-height: auto;
    display: block;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    inset: auto;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    justify-content: center;
  }

  .avatar {
    max-width: 100px;
    margin-bottom: 1rem;
  }

  .brand {
    font-size: 1.4rem;
    padding-bottom: 0.75rem;
    margin: 0;
    text-align: center;
  }

  .social-links {
    margin-bottom: 0;
    margin-top: 0.1rem !important;
    text-align: center;
  }

  .social-links li {
    display: inline;
    padding: 0 2px;
  }

  .social-links i {
    font-size: 1.6rem !important;
  }

  .sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .sep {
    display: none;
  }

  .mobile-separator {
    display: block;
    width: 1px;
    background: #8a8a8a40;
    align-self: stretch;
    margin: 0 1rem;
  }

  .vnav {
    font-size: 1.1rem;
    text-align: center;
  }

  .vnav li {
    display: block;
    margin-bottom: 0.5rem;
  }

  .vnav a {
    font-size: 1.1rem;
  }

  .content {
    margin: 0;
    padding: 1rem;
    max-width: 100%;
    box-sizing: border-box;
  }

  .card {
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    flex-direction: column;
  }

  .card h2,
  .card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .publication-content {
    gap: 1rem;
  }

  .right-media {
    width: 200px !important;
    height: 200px !important;
    align-self: center;
  }

  .research-card .right-media {
    width: 220px !important;
    height: 220px !important;
  }

  .right-media video,
  .right-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
  }

  .back-to-top {
    z-index: 1000;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  * {
    max-width: 100%;
    box-sizing: border-box;
  }

  img,
  video {
    max-width: 100%;
    height: auto;
  }
}
