/* =====================================================
   UrbäNRG Lab — Design System
   TU Delft palette, clean academic minimalism
   ===================================================== */

:root {
  --tud-navy:      #0C2340;
  --tud-blue:      #00A6D6;
  --tud-blue-dim:  rgba(0,166,214,0.12);
  --tud-blue-pale: #E6F6FB;
  --orange:        #E8711A;
  --orange-pale:   #FFF4EC;
  --orange-border: #F9C49A;
  --blue-pale:     rgba(0,166,214,0.20);
  --blue-border:   rgba(0,166,214,0.28);
  --section-alt:   #F5F7F9;
  --text-body:     #1C2B39;
  --text-muted:    #6c757d;
  --border:        #DDE4EA;
  --radius:        6px;
  --shadow-sm:     0 1px 6px rgba(12,35,64,0.07);
  --shadow-md:     0 4px 18px rgba(12,35,64,0.11);
}

/* ── BASE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  padding-top: 62px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 0.97rem;
  color: var(--text-body);
  background: #fff;
  line-height: 1.72;
}

[id] { scroll-margin-top: 72px; }

a { color: var(--tud-blue); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--tud-navy); }

/* ── NAVBAR ────────────────────────────────────────── */
.navbar {
  background-color: var(--tud-navy) !important;
  border-bottom: 3px solid var(--tud-blue);
  box-shadow: 0 2px 14px rgba(12,35,64,0.22);
  padding: 0.55rem 0;
}
.navbar .navbar-brand { padding: 0; margin-right: 0; }
.navbar .nav-link {
  color: rgba(255,255,255,0.78) !important;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem !important;
  border-radius: 4px;
  transition: color 0.18s, background-color 0.18s;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #fff !important;
  background-color: var(--tud-blue-dim);
}
.img-menu-tud     { display: block; max-height: 30px; }
.img-menu-3dgi    { display: block; max-height: 33px; margin-left: 18px; }
.img-menu-urbanrg { display: block; max-height: 30px; margin-left: 18px; }

/* Collapsed nav panel on small screens */
@media (max-width: 991.98px) {
  .navbar-collapse {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 0 0.75rem;
    margin-top: 0.4rem;
  }
  .navbar .nav-link {
    padding: 0.5rem 0.5rem !important;
    border-radius: 0;
  }
}

/* ── INTRO BANNER ──────────────────────────────────── */
#intro_banner {
  text-align: center;
  padding: 2.8rem 1rem 2rem;
}
#intro_banner h2 { color: var(--tud-navy); font-weight: 700; margin-top: 0.75rem; }

/* ── SECTION RHYTHM ────────────────────────────────── */
.row { padding-top: 2.5rem; padding-bottom: 2.5rem; }

#vision               { background: var(--section-alt); }
#external_members_row { background: var(--section-alt); }

/* output page inner sections */
#software_row,
#other_resources_row {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ── TYPOGRAPHY ────────────────────────────────────── */
h2, h3 { color: var(--tud-navy); font-weight: 700; }
h2 { font-size: 1.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem;  letter-spacing: -0.005em; }

/* Section heading — clean, no decorative bars */
.section-title {
  color: var(--tud-navy);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

h2.page-title {
  color: var(--tud-navy);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* ── MEMBERS — clean open grid ─────────────────────── */
.member-tile {
  text-align: center;
  padding-bottom: 1.5rem;
}

.member-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  display: block;
  margin: 0 auto 1rem;
  filter: grayscale(8%);
  transition: filter 0.2s;
}
.member-tile:hover .member-photo { filter: grayscale(0%); }

.member-name {
  color: var(--tud-navy);
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
  line-height: 1.3;
}

.member-role {
  color: var(--text-muted);
  font-size: 0.79rem;
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.member-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0.25rem;
  transition: color 0.15s;
}
.member-links a:hover { color: var(--tud-navy); }

/* ── PROJECTS ──────────────────────────────────────── */
.project-card {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.project-card:hover { box-shadow: var(--shadow-md); }

.project-logo {
  flex-shrink: 0;
  width: 175px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}
.project-logo img { width: 100%; height: auto; display: block; }

.project-body h4 {
  color: var(--tud-navy);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.project-body p { margin-bottom: 0.35rem; font-size: 0.9rem; }

/* ── PUBLICATIONS ──────────────────────────────────── */
.pub-entry {
  padding: 0.75rem 0;
  /* border-bottom: 1px solid var(--border); */
}
/* .pub-entry:last-child { border-bottom: none; } */

/* Publication thumbnail — floated left, text wraps around it */
.pub-thumb {
  display: block;
  width: 105px;
  height: 78px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--section-alt);
  /* transition: opacity 0.15s; */
  transition: transform .3s;
}
.pub-thumb-link:hover .pub-thumb {
 transform: scale(1.3);
 /* opacity: 0.78; */
 cursor: zoom-in;
}

/* Publication type label — outline pill beneath thumbnail */
.pub-thumb-link {
  display: block;
  float: left;
  clear: left;
  margin: 0 14px 6px 0;
  text-align: center;
}
.pub-thumb-link::after {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1.5px solid currentColor;
  margin-top: 5px;
  line-height: 1.5;
}

.pub-thumb-link.book-chapter::after { content: 'Book Chapter';  color: #4A5E70; }
.pub-thumb-link.phd-thesis::after   { content: 'PhD Thesis';    color: #1B6CD1; }
.pub-thumb-link.article::after      { content: 'Article';       color: #0C2340; }
.pub-thumb-link.conf-paper::after   { content: 'Conf. Paper';   color: #0D7A8A; }
.pub-thumb-link.ext-abstract::after { content: 'Ext. Abstract'; color: #85A9CC; }
.pub-thumb-link.tech-report::after  { content: 'Tech. Report';  color: #B5B5B5; }


/* ── LIGHTBOX ───────────────────────────────────────── */
.pub-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(12,35,64,0.88);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.pub-lightbox.active { display: flex; }
.pub-lightbox img {
  max-width: 88vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0,0,0,0.55);
  animation: lb-in 0.18s ease;
  cursor: default;
}
.pub-lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
}
.pub-lightbox-close:hover { color: #fff; }
@keyframes lb-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

/* Year headings clear any lingering floats */
.pub-year-heading {
  clear: both;
}

.pub_auth_ { color: var(--text-muted); font-size: 0.86rem; }
.pub_title b { color: var(--text-body); font-size: 0.93rem; }
.pub_book1, .pub_book1b, .pub_book2 { color: var(--text-muted); font-size: 0.84rem; }
.pub_doi__ a, .pub_web__ a, .pub_pdf__ a {
  color: var(--tud-blue);
  font-size: 0.92rem;
  margin-right: 0.3rem;
}
.pub_doi__ a:hover, .pub_web__ a:hover, .pub_pdf__ a:hover { color: var(--tud-navy); }

/* Year nav sidebar */
.pub-year-nav {
  position: sticky;
  top: 76px;
  padding: 0.6rem 0.75rem;
  background: var(--blue-pale);
  border-radius: var(--radius);
  border: 1px solid var(--blue-border);
  font-size: 0.8rem;
}
.pub-year-nav h6 {
  color: var(--tud-navy);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  margin-top: 0.5rem;
}
.pub-year-nav h6:first-child { margin-top: 0; }
.pub-year-nav ul { list-style: none; padding: 0; margin: 0; }
.pub-year-nav li { border-bottom: 1px solid var(--blue-border); }
.pub-year-nav li:last-child { border-bottom: none; }
.pub-year-nav a {
  display: block;
  padding: 0.2rem 0;
  color: var(--text-body);
  font-size: 0.8rem;
  font-weight: 500;
}
.pub-year-nav a:hover { color: var(--tud-blue); }

/* Year heading inside publications column */
.pub-year-heading {
  color: var(--tud-navy);
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}
/* .pub-year-heading:first-child { margin-top: 0; } */

/* ── PAGINATION (section anchor nav) ──────────────── */
.pagination { flex-wrap: wrap; gap: 0.25rem; margin-bottom: 1.5rem; }
.pagination .page-link {
  color: var(--tud-navy);
  border: 1px solid var(--border);
  border-radius: 4px !important;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pagination .page-link:hover {
  background-color: var(--tud-navy);
  border-color: var(--tud-navy);
  color: #fff;
}

/* ── MAP ───────────────────────────────────────────── */
.gmap {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ── HOME PAGE LAYOUT ──────────────────────────────── */
.main-col { padding-right: 2.5rem; }

.page-section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.page-section:last-child { border-bottom: none; }

#vision.page-section { background: var(--section-alt); padding-left: 1.25rem; padding-right: 1.25rem; border-radius: var(--radius); }

/* ── SIDEBAR ───────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 72px;
  margin-left: 1.5rem;
  background: var(--blue-pale);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}

.sidebar-widget {
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--blue-border);
}
.sidebar-widget:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.sidebar-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--tud-blue);
  border-radius: 4px;
  flex-shrink: 0;
  color: #fff;
  font-size: 0.65rem;
}

.sidebar-heading a {
  color: var(--tud-navy);
  text-decoration: none;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
}
.sidebar-heading a:hover { color: var(--tud-blue); }

.sidebar-news-item {
  margin-bottom: 0.8rem;
  background: #fff;
  border-radius: 5px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--blue-border);
}
.sidebar-news-date {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--tud-blue);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.sidebar-news-item a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-body);
  line-height: 1.4;
}
.sidebar-news-item a:hover { color: var(--tud-blue); }

.sidebar-more {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tud-blue);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.sidebar-more:hover { color: var(--tud-navy); }

@media (max-width: 991px) {
  .main-col { padding-right: 0; }
  .sidebar {
    position: static;
    margin-left: 0;
    margin-top: 2rem;
    max-height: none;
    overflow: visible;
  }
}

/* ── NEWS ──────────────────────────────────────────── */
.news-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2.5rem;
  row-gap: 2.5rem;
  padding: 1.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.news-item:last-child { border-bottom: none; }

.news-date {
  grid-column: 1 / -1;
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
  border-bottom: 2px solid var(--blue-border);
  text-align: left;
}
.news-year {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--tud-navy);
  text-transform: none;
}

.news-body {
  min-width: 0;
}

.news-title {
  color: var(--tud-navy);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.news-body-upcoming {}
.news-event-title {}
.news-event-link {}
.news-event-date {}
.news-event-location {}

.news-link {
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.news-link:hover { color: var(--tud-blue); }

.news-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}
.news-meta i { margin-right: 0.3rem; }

.news-body p {
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.news-presentations {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}
.news-presentations li {
  font-size: 0.88rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}
.news-presentations li::before {
  content: '—';
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 0.75rem;
}
.news-presenter {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-left: auto;
  white-space: nowrap;
}

.news-inline {
  display: flex;
  flex-direction: column-reverse;
  gap: 1rem;
}
.news-text {
  min-width: 0;
}
.news-figure {
  width: 100%;
  margin: 0;
}
.news-figure img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* .news-figure:hover img {
  width: 100%;
  height: 100%;
  object-fit: initial;
  transform: scale(1.9);
} */


.news-figure figcaption {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}



/* Stack on small screens */
@media (max-width: 767.98px) {
  .news-item { grid-template-columns: 1fr; }
}

/* ── HOMEPAGE CAROUSEL ─────────────────────────────── */
#carousel-urbanrg {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--tud-navy);
  aspect-ratio: 16 / 10;     /* photo shape stays constant at any screen width */
  width: 100%;
  max-width: 560px;          /* prevents the photos from growing too large on wide screens */
  margin-left: auto;
  margin-right: auto;
}

#carousel-urbanrg .carousel-inner,
#carousel-urbanrg .carousel-item {
  height: 100%;
}

#carousel-urbanrg .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Indicator dots — sit below the image inside a translucent strip so they're always visible */
#carousel-urbanrg .carousel-indicators {
  margin: 0;
  padding: 8px 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(12,35,64,0) 0%, rgba(12,35,64,0.55) 100%);
}
#carousel-urbanrg .carousel-indicators [data-bs-target] {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: transparent;
  opacity: 0.9;
  margin: 0 5px;
  transition: background 0.2s, transform 0.2s;
}
#carousel-urbanrg .carousel-indicators [data-bs-target]:hover {
  background: rgba(255,255,255,0.6);
  transform: scale(1.15);
}
#carousel-urbanrg .carousel-indicators .active {
  background: var(--tud-blue);
  border-color: var(--tud-blue);
}

/* Prev/next arrow buttons — circular tinted backdrop so they're clearly clickable */
#carousel-urbanrg .carousel-control-prev,
#carousel-urbanrg .carousel-control-next {
  width: 12%;
  opacity: 0.85;
  transition: opacity 0.2s;
}
#carousel-urbanrg .carousel-control-prev:hover,
#carousel-urbanrg .carousel-control-next:hover { opacity: 1; }

#carousel-urbanrg .carousel-control-prev-icon,
#carousel-urbanrg .carousel-control-next-icon {
  width: 38px;
  height: 38px;
  background-color: rgba(12,35,64,0.55);
  border-radius: 50%;
  background-size: 50% 50%;
  transition: background-color 0.2s, transform 0.2s;
}
#carousel-urbanrg .carousel-control-prev:hover .carousel-control-prev-icon,
#carousel-urbanrg .carousel-control-next:hover .carousel-control-next-icon {
  background-color: var(--tud-blue);
  transform: scale(1.1);
}

/* "Hint" pulse on the active indicator so users notice the carousel is live */
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,166,214,0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(0,166,214,0);   }
}
#carousel-urbanrg .carousel-indicators .active {
  animation: pulse-dot 2s ease-out infinite;
}

/* ── MISC ──────────────────────────────────────────── */
small { color: var(--text-muted); }
