html {
  overflow-y: scroll;
}
:root {
  --bg: #0b0b0c;
  --panel: #0f0f11;
  --text: #f2f2f2;
  --muted: #b8b8b8;
  --link: #66a3ff;
  --border: #232327;

  --maxw: 1200px;
  --pad: 22px;

  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(var(--maxw), 92vw);
  margin: 0 auto;
  padding: 26px var(--pad);
}

header {
  padding: 18px 0 16px 0;
  border-bottom: 1px solid var(--border);
}

.site-title {
  margin: 0;
  font-size: 44px;
  letter-spacing: 0.2px;
}

.tagline {
  margin: 6px 0 0 0;
  color: var(--muted);
}

nav {
  margin-top: 14px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

nav a {
  color: var(--link);
  text-decoration: none;
  font-weight: 650;
  padding: 6px 10px;
  border-radius: 10px;
}

nav a:hover {
  text-decoration: underline;
}

nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  text-decoration: none;
}

main { padding: 22px 0; }

.section { margin-top: 22px; }

h2 {
  margin: 0 0 14px 0;
  font-size: 28px;
}

.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 12px 0;
}

.small { color: var(--muted); font-size: 14px; }

a { color: var(--link); }

footer {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

/* About layout */
.about-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.about-photo {
  width: 220px;
  border-radius: 12px;
  flex-shrink: 0;
  display: block;
}

.about-text { flex: 1; }

/* Projects page layout */
.project-card { padding: 18px; }
.project-title { margin: 0 0 6px 0; font-size: 20px; }
.project-meta { margin-bottom: 14px; }

.project-layout {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.section-break{
  margin: 40px 0 22px;
  padding-top: 20px;
  border-top: 3px solid #3b82f6; /* accent blue */
}

.section-break h2{
  margin: 0;
}

.section-break-sub{
  margin-top: 6px;
  color: #cbd5f5;
}


/* Reset counters for each publication section */
.journal-pubs {
  counter-reset: journal-counter;
}

.conf-pubs {
  counter-reset: conf-counter;
}

/* Journal numbering */
.journal-pubs .pub::before {
  counter-increment: journal-counter;
  content: "[" counter(journal-counter) "] ";
  font-weight: 600;
  color: var(--accent, #5da9ff);
  margin-right: 6px;
}

/* Conference numbering */
.conf-pubs .pub::before {
  counter-increment: conf-counter;
  content: "[" counter(conf-counter) "] ";
  font-weight: 600;
  color: var(--accent, #5da9ff);
  margin-right: 6px;
}

/* Carousel styles used in the projects page*/
.carousel {
  flex: 0 0 520px;      /* Bigger than headshot */
  max-width: 520px;
}

.carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  padding: 10px;
}

.carousel-item {
  scroll-snap-align: start;
  min-width: 480px;
  margin: 0;
}

.carousel-item img {
  width: 100%;
  height: 300px;             /* controls visible size */
  object-fit: contain;       /* no cropping; use cover if you prefer */
  border-radius: 10px;
  display: block;
  background: rgba(0,0,0,0.25);
}

.carousel-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.carousel-btn {
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  color: inherit;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 18px;
  line-height: 1;
}

.carousel-btn:hover {
  background: rgba(255,255,255,0.09);
}

.carousel-hint { margin-top: 8px; opacity: 0.8; }

.project-grid{
  display:flex;
  gap:24px;
  align-items:flex-start;
}
.project-text{flex:1; min-width: 280px;}
.project-media{flex:1; min-width: 320px;}
.project-text { flex: 1; min-width: 260px; }
.project-bullets { margin: 10px 0 0 0; padding-left: 18px; }


/* Media actions under project carousel */
.media-actions {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  padding-left: 0.2rem;
}

/* Video demo link */
.video-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #bfbfbf;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.video-link:hover {
  color: #ffffff;
}

/* YouTube icon */
.video-icon {
  height: 16px;
  width: auto;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.video-link:hover .video-icon {
  opacity: 1;
}
/* Make the highlight cards look like normal cards (no blue link styling)*/
.highlight-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Add the “highlight the target project” behavior on projects.html*/
.project-card:target {
  outline: 2px solid rgba(100, 160, 255, 0.8);
  outline-offset: 6px;
  background-color: rgba(100, 160, 255, 0.08);
}


@media (max-width: 900px) {

  /* Project layouts */
  .project-grid {
    flex-direction: column;
  }

  .project-layout {
    flex-direction: column;
  }

  /* Carousel behavior */
  .carousel {
    max-width: 100%;
    flex-basis: auto;
  }

  .carousel-item {
    min-width: 85vw;
  }

  .carousel-item img {
    height: 320px;
  }

  /* About section */
  .about-layout {
    flex-direction: column;
  }

  .about-photo {
    width: 180px;
  }

  .site-title {
    font-size: 36px;
  }

}

