/* ============================================================
   Modeling and Optimization — IICT-BAS
   Modern Responsive Stylesheet — 2026
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-primary:        #0c4a6e;
  --color-primary-dark:   #083344;
  --color-primary-mid:    #0369a1;
  --color-primary-light:  #bae6fd;
  --color-accent:         #f59e0b;
  --color-accent-dark:    #d97706;
  --color-bg:             #ffffff;
  --color-bg-light:       #f0f9ff;
  --color-bg-sidebar:     #e8f4fd;
  --color-text:           #1e293b;
  --color-text-muted:     #64748b;
  --color-border:         #e2e8f0;
  --color-heading:        #0c4a6e;
  --font-main:            system-ui, 'Segoe UI', Inter, Arial, Helvetica, sans-serif;
  --radius:               6px;
  --shadow-sm:            0 1px 4px rgba(12, 74, 110, 0.08);
  --shadow:               0 2px 16px rgba(12, 74, 110, 0.12);
  --shadow-hover:         0 4px 24px rgba(12, 74, 110, 0.18);
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* --- Base Typography --- */
body {
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text);
  background: #f1f5f9;
}

a {
  color: var(--color-primary-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-main);
  color: var(--color-heading);
  line-height: 1.3;
}

ul, ol {
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.45em;
}

p {
  margin-bottom: 0.9em;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--color-primary);
}

/* ============================================================
   SITE WRAPPER
   ============================================================ */

.site-wrapper {
  max-width: 1140px;
  margin: 32px auto;
  background: var(--color-bg);
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
  border-top: 4px solid var(--color-primary);
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  background: linear-gradient(160deg, #0c4a6e 0%, #083344 100%);
  color: #fff;
}

/* --- Navigation --- */
.site-nav {
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.site-nav ul li a {
  display: block;
  padding: 13px 22px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: clamp(10.5px, 3vw, 14px);
  font-weight: 500;
  letter-spacing: 0.2px;
  border-bottom: 3px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.site-nav ul li a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-bottom-color: rgba(245, 158, 11, 0.5);
}

.site-nav ul li a.nav-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-bottom-color: var(--color-accent);
  font-weight: 600;
}

/* --- Branding --- */
.site-branding {
  padding: 28px 36px 22px;
  position: relative;
  border-bottom: 3px solid var(--color-accent);
}

.lang-switch {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-switch a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  transition: background 0.15s, color 0.15s;
}

.lang-switch a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.lang-switch .lang-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.lang-switch .lang-sep {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 300;
}

.site-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  padding-right: 120px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.site-subtitle {
  font-size: 14px;
  margin: 0;
  opacity: 0.88;
}

.site-subtitle a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  text-underline-offset: 2px;
}

.site-subtitle a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ============================================================
   MAIN
   ============================================================ */

.site-main {
  background: var(--color-bg);
}

/* --- Two-Column Layout --- */
.page-two-col {
  display: flex;
  align-items: flex-start;
  min-height: 420px;
}

.main-col {
  flex: 1 1 0;
  padding: 32px 36px;
  min-width: 0;
}

.side-col {
  flex: 0 0 300px;
  width: 300px;
  padding: 28px 24px;
  background: var(--color-bg-sidebar);
  border-left: 4px solid var(--color-primary);
  align-self: stretch;
}

/* --- Full-Width Layout --- */
.page-full {
  padding: 36px 40px;
}

/* ============================================================
   SECTION BLOCKS
   ============================================================ */

.section-block {
  margin-bottom: 28px;
}

.section-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-heading);
  padding: 0 0 10px 14px;
  margin-bottom: 16px;
  border-left: 4px solid var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  line-height: 1.3;
}

/* Past-projects section headings — same size/colour, steel-blue border instead of orange */
.section-heading--past {
  color: var(--color-heading);
  border-left-color: #64748b;
}

/* Spacing after active projects, before the era divider */
.projects-active-end {
  height: 28px;
}

/* Era divider between Current and Past projects */
.projects-era-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0 30px;
}
.projects-era-divider::before,
.projects-era-divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--color-accent));
}
.projects-era-divider::after {
  background: linear-gradient(to left, transparent, var(--color-accent));
}
.projects-era-divider span {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  padding: 5px 14px;
  border: 1.5px solid var(--color-accent);
  border-radius: 20px;
  background: #fffbeb;
}

.label-heading {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 18px 0 7px;
}

.label-heading:first-child {
  margin-top: 0;
}

/* --- Sidebar Blocks --- */
.sidebar-block {
  margin-bottom: 24px;
}

.side-col h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent-dark);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(245, 158, 11, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.side-col p,
.side-col li {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.65;
}

.side-col ul {
  margin-bottom: 10px;
}

.read-more {
  margin-top: 14px;
  text-align: right;
}

.read-more a {
  color: var(--color-primary-mid);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  border-bottom: 2px solid var(--color-primary-light);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.read-more a:hover {
  color: var(--color-accent-dark);
  border-color: var(--color-accent);
}

/* ============================================================
   HOME PAGE — INTRO SECTION
   ============================================================ */

.intro-section {
  padding: 32px 36px 28px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(to right, #fff 60%, #f0f9ff 100%);
  overflow: hidden;
}

.intro-section img.float-left {
  float: left;
  margin: 2px 20px 10px 0;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.activities-visual {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}

.activities-visual img {
  border-radius: 6px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  max-height: 200px;
  width: auto;
}

/* ============================================================
   ACTIVITIES PAGE — JOURNAL LIST
   ============================================================ */

.journal-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 16px;
}

.journal-list li {
  padding: 8px 0 8px 18px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  position: relative;
}

.journal-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 11px;
  top: 10px;
}

.journal-list li:last-child {
  border-bottom: none;
}

.editor-choice {
  margin-top: 16px;
  padding: 16px 18px;
  background: var(--color-bg-light);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px;
  color: #374151;
  box-shadow: var(--shadow-sm);
}

.editor-choice img {
  margin: 14px auto 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.project-links-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.project-links-list li {
  padding: 5px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--color-border);
}

.project-links-list li:last-child { border-bottom: none; }

.project-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-primary-mid);
  font-weight: 500;
  font-size: 13.5px;
  padding: 4px 0;
}

.project-logo-link:hover { color: var(--color-accent-dark); }
.project-logo-link img { height: 32px; width: auto; display: inline-block; }

.teaching-list {
  list-style: none;
  padding: 0;
  margin: 6px 0;
}

.teaching-list .institution {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 13.5px;
  margin-top: 10px;
  display: block;
}

.teaching-list li {
  font-size: 13.5px;
  padding: 2px 0 2px 12px;
  color: #374151;
  border-bottom: none;
}

/* ============================================================
   CURRENT PROJECTS CARDS
   ============================================================ */

.current-projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}

.project-card {
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  cursor: pointer;
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.project-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-active {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 2px 9px;
  border-radius: 20px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.badge-active::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #16a34a;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.project-meta-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  padding: 1px 7px;
  border-radius: 3px;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 4px;
}

.badge-funder {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-bg-light);
  border: 1px solid var(--color-primary-light);
  padding: 2px 9px;
  border-radius: 4px;
  white-space: nowrap;
}

.project-card h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--color-heading);
  margin: 0;
  line-height: 1.35;
}

.project-card .project-full-title {
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.55;
  margin: -4px 0 0;
}

.project-card p {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.65;
  margin: 0;
}

.project-card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
  font-size: 12.5px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-primary-mid);
  text-decoration: none;
  white-space: nowrap;
}

/* Stretch the link to cover the entire card — clicking anywhere navigates */
.project-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.project-card-link:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

/* ============================================================
   PROJECT DETAIL PAGES
   ============================================================ */

.project-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.project-page-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--color-border);
}

.project-page-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.project-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.3;
  margin-bottom: 6px;
}

.project-page-subtitle {
  font-size: 16px;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 6px;
}

.project-page-funder {
  font-size: 13.5px;
  color: var(--color-primary);
  font-weight: 600;
  margin: 0;
}

/* Project header: logo left, text right */
.project-header-layout {
  display: flex;
  align-items: center;
  gap: 28px;
}

.project-header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-right: 28px;
  border-right: 2px solid var(--color-border);
}

.project-header-text {
  flex: 1;
  min-width: 0;
}

.project-funder-logo-link {
  display: inline-block;
}

.project-funder-logo {
  display: block;
  height: 60px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  opacity: 0.88;
  transition: opacity 0.2s;
}

.project-funder-logo-link:hover .project-funder-logo {
  opacity: 1;
}

/* Stack vertically on mobile */
@media (max-width: 560px) {
  .project-header-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .project-header-logo {
    padding-right: 0;
    border-right: none;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 14px;
    width: 100%;
  }
  .project-funder-logo {
    height: 48px;
  }
}

.project-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-section {
  padding-bottom: 20px;
}

.project-placeholder {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 14px;
  padding: 20px 0 4px 14px;
  border-left: 3px solid var(--color-border);
}

.team-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 14px;
  border-left: 3px solid var(--color-border);
  flex-wrap: wrap;
}

.team-list li.team-lead {
  border-left-color: var(--color-accent);
}

.team-list li a {
  font-weight: 600;
  color: var(--color-heading);
  text-decoration: none;
}

.team-list li a:hover {
  text-decoration: underline;
  color: var(--color-heading);
}

.team-list li .team-name {
  font-weight: 600;
  color: var(--color-heading);
}

.team-role {
  display: block;
  width: 100%;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.team-affil {
  font-size: 13px;
  color: var(--color-text-muted);
}

@media (max-width: 720px) {
  .current-projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   PROJECTS PAGE
   ============================================================ */

.projects-list {
  list-style: disc;
  padding-left: 1.4em;
  margin: 8px 0 16px;
}

.projects-list li {
  font-size: 14px;
  color: #374151;
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
  list-style: disc;
}

.projects-list li:last-child { border-bottom: none; }

.nnp-block {
  background: var(--color-bg-light);
  border-left: 4px solid var(--color-primary-mid);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}

.nnp-block strong { display: block; margin-bottom: 4px; color: var(--color-primary); }

/* ============================================================
   STAFF LIST PAGE
   ============================================================ */

.staff-list-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: none;
  padding-left: 14px;
  border-left: 4px solid var(--color-accent);
}

.staff-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.staff-list li {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  background: var(--color-bg-light);
  font-size: 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: box-shadow 0.18s, transform 0.18s;
}

.staff-list li:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.staff-list li:last-child {
  border-bottom: 1px solid var(--color-border);
}

.staff-head {
  grid-column: 1 / -1;
  font-size: 15.5px;
  border-left-color: var(--color-accent);
  background: linear-gradient(to right, #fefce8, var(--color-bg-light));
}

.staff-head a {
  font-size: 15.5px;
  color: var(--color-primary-dark);
}

.staff-head .staff-role {
  font-size: 13px;
  color: var(--color-accent-dark);
  font-weight: 600;
}

.staff-list a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.staff-list a:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

.no-link {
  color: var(--color-text-muted);
  font-weight: 500;
}

.staff-role {
  color: var(--color-text-muted);
  font-size: 12.5px;
  display: block;
}

/* ============================================================
   CONTACTS PAGE
   ============================================================ */

.contact-card {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 26px 28px;
  max-width: 520px;
  font-size: 15px;
  line-height: 2;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.contact-card:hover {
  box-shadow: var(--shadow-hover);
}

address {
  font-style: normal;
}

.map-embed-wrapper {
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.map-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-open-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--color-primary-mid);
  text-decoration: none;
  margin-top: 8px;
}

.map-open-link:hover {
  text-decoration: underline;
  color: var(--color-accent-dark);
}

@media (max-width: 560px) {
  .map-embed-wrapper { height: 260px; }
}

/* ============================================================
   GANTT / ROADMAP
   ============================================================ */

.gantt-wrapper {
  margin-top: 10px;
}

.gantt-head {
  display: flex;
  align-items: flex-end;
  margin-bottom: 2px;
}

.gantt-label-col {
  flex: 0 0 210px;
  min-width: 210px;
  padding-right: 14px;
  box-sizing: border-box;
}

.gantt-track-col {
  flex: 1;
  min-width: 0;
}

.gantt-year-bar {
  display: flex;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 6px;
}

.gantt-year-bar span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 3px 0 5px;
  border-left: 1px solid var(--color-border);
}

.gantt-year-bar span:first-child {
  border-left: none;
}

.gantt-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

/* Label: badge + name stacked above period */
.gantt-row .gantt-label-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gantt-label-main {
  display: flex;
  align-items: center;
  gap: 7px;
}

.gantt-wp-name {
  font-size: 12px;
  color: var(--color-text);
  line-height: 1.25;
}

.gantt-period {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  padding-left: 2px;
}

.gantt-track {
  position: relative;
  height: 24px;
  border-radius: 6px;
  background-color: #f1f5f9;
  background-image:
    linear-gradient(90deg, transparent calc(33.33% - 0.5px), var(--color-border) calc(33.33% - 0.5px), var(--color-border) calc(33.34%), transparent calc(33.34%)),
    linear-gradient(90deg, transparent calc(66.67% - 0.5px), var(--color-border) calc(66.67% - 0.5px), var(--color-border) calc(66.68%), transparent calc(66.68%));
}

.gantt-bar {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 20px;
  min-width: 8px;
  transition: opacity 0.15s;
  cursor: default;
}

.gantt-bar:hover { opacity: 0.8; }

/* Start and end dots */
.gantt-bar::before,
.gantt-bar::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: inherit;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.gantt-bar::before { left: -2px; }
.gantt-bar::after  { right: -2px; }

/* WP colours */
.gantt-bar-1, .wp-badge-1 { background: #3b82f6; }
.gantt-bar-2, .wp-badge-2 { background: #6366f1; }
.gantt-bar-3, .wp-badge-3 { background: #8b5cf6; }
.gantt-bar-4, .wp-badge-4 { background: #a855f7; }
.gantt-bar-5, .wp-badge-5 { background: #14b8a6; }
.gantt-bar-6, .wp-badge-6 { background: var(--color-accent-dark); }

.gantt-bar-6 { opacity: 0.6; }
.gantt-bar-6:hover { opacity: 0.75; }

.wp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Mobile: hide bars, show as compact list */
@media (max-width: 560px) {
  .gantt-head { display: none; }
  .gantt-track-col { display: none; }
  .gantt-row {
    padding: 7px 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
  }
  .gantt-row:last-child { border-bottom: none; }
  .gantt-row .gantt-label-col {
    flex: none;
    min-width: 0;
    width: 100%;
    padding-right: 0;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .gantt-label-main { flex: 1; min-width: 0; }
  .gantt-period {
    padding-left: 0;
    font-size: 11px;
    color: var(--color-text-muted);
  }
}

/* ── Milestone grid (sprint-level breakdown) ─────────────────────────────── */
.milestone-cols {
  display: flex;
  gap: 20px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.milestone-col {
  flex: 1;
  min-width: 180px;
}
.milestone-col-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-heading);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.milestone-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.milestone-list li {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 5px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.4;
}
.milestone-list li:last-child { border-bottom: none; }
.milestone-id {
  font-size: 10px;
  font-weight: 800;
  font-family: monospace;
  background: #eff6ff;
  color: #2563eb;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .milestone-cols { flex-direction: column; gap: 16px; }
}

.wp-period {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 1px 6px;
  white-space: nowrap;
  margin-left: 4px;
  vertical-align: middle;
}

/* ============================================================
   STAFF PROFILE PAGES
   ============================================================ */

.staff-profile-grid {
  display: flex;
  align-items: flex-start;
}

/* Sidebar is in DOM second but appears visually FIRST (left) */
.staff-side {
  order: -1;
  flex: 0 0 270px;
  width: 270px;
  padding: 28px 22px;
  background: var(--color-bg-sidebar);
  border-right: 4px solid var(--color-primary);
  border-left: none;
  align-self: stretch;
}

.staff-main {
  flex: 1 1 0;
  padding: 28px 36px;
  min-width: 0;
  order: 0;
}

.staff-photo {
  width: 100%;
  max-width: 210px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  margin: 0 auto 18px;
  box-shadow: var(--shadow-sm);
}

.staff-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 2px;
}

.staff-rank {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}

.contact-detail {
  font-size: 13px;
  color: #475569;
  margin-bottom: 7px;
  display: flex;
  gap: 6px;
}

.contact-detail span.label {
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

.interests-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 18px 0 7px;
}

.interests-list {
  list-style: disc;
  padding-left: 1.2em;
  margin-bottom: 14px;
}

.interests-list li {
  font-size: 13px;
  color: #374151;
  margin-bottom: 4px;
}

.ext-links {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ext-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-primary-mid);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
}

.ext-links a:hover {
  color: var(--color-accent-dark);
}

.ext-links a img {
  height: 20px;
  width: auto;
  display: inline-block;
}

.profile-back {
  font-size: 13.5px;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-primary-mid);
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.profile-back:hover {
  background: var(--color-bg-light);
  color: var(--color-primary);
  text-decoration: none;
}

.pub-list {
  padding-left: 1.4rem;
  margin: 0.5rem 0 1rem;
}

.pub-list li {
  font-size: 13.5px;
  line-height: 1.65;
  margin-bottom: 10px;
  color: #374151;
}

.pub-subheading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 1.5rem 0 0.5rem;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--color-primary-light);
}

.cert-block {
  margin: 16px 0;
  text-align: center;
}

.cert-block img {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin: 0 auto;
}

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

.site-footer {
  background: linear-gradient(to bottom, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: rgba(255, 255, 255, 0.80);
  text-align: center;
  padding: 0;
  font-size: 13px;
  clear: both;
  border-top: 3px solid var(--color-accent);
}

.site-footer p {
  margin: 0;
  padding: 18px 24px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.90);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.clearfix::after { content: ''; display: block; clear: both; }
.text-center { text-align: center; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.divider { border: none; border-top: 1px solid var(--color-border); margin: 22px 0; }

/* ============================================================
   RESPONSIVE — TABLET (≤ 960px)
   ============================================================ */

@media (max-width: 960px) {
  .site-wrapper {
    margin: 0;
    border-radius: 0;
    border-top: 4px solid var(--color-primary);
  }

  .page-two-col {
    flex-direction: column;
  }

  .side-col {
    flex: none;
    width: 100%;
    border-left: none;
    border-right: none;
    border-top: 4px solid var(--color-primary);
  }

  .staff-profile-grid {
    flex-direction: column;
  }

  .staff-side {
    order: 0;
    flex: none;
    width: 100%;
    border-right: none;
    border-bottom: 4px solid var(--color-primary);
  }

  .staff-main {
    order: 0;
  }

  .main-col      { padding: 24px 22px; }
  .staff-main    { padding: 24px 22px; }
  .site-branding { padding: 22px 22px 20px; }
  .intro-section { padding: 24px 22px; background: #fff; }
  .page-full     { padding: 26px 22px; }
  .site-title    { font-size: 19px; padding-right: 90px; }

  .staff-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 560px)
   ============================================================ */

@media (max-width: 560px) {
  /* Nav: each item gets an equal share of the full width */
  .site-nav {
    overflow-x: hidden;
  }
  .site-nav ul {
    flex-wrap: nowrap;
    width: 100%;
  }
  .site-nav ul li {
    flex: 1 1 0;
    min-width: 0;
  }
  .site-nav ul li a {
    padding: 10px 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }

  .site-title         { font-size: 17px; padding-right: 70px; }
  .lang-switch        { font-size: 12px; top: 16px; right: 16px; }
  .intro-section img.float-left { float: none; margin: 0 0 16px; }
  .activities-visual  { flex-direction: column; }
  .staff-photo        { max-width: 160px; }
  .page-full          { padding: 20px 16px; }
  .main-col           { padding: 20px 16px; }
  .staff-main         { padding: 20px 16px; }
  .site-branding      { padding: 18px 16px 16px; }

  .staff-list {
    grid-template-columns: 1fr;
  }

  /* Team list: stack name and affiliation vertically */
  .team-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .team-role  { font-size: 11px; }
  .team-affil { font-size: 12px; }

  /* Project page team list spacing */
  .team-list {
    gap: 8px;
  }
}

/* ============================================================
   RESPONSIVE — VERY SMALL PHONES (≤ 350px)
   ============================================================ */

@media (max-width: 350px) {
  .site-title { font-size: 15px; }
}
