/* ============================================================
   MSOE Group — Main Stylesheet
   University of Southern Denmark
   ============================================================
   All pages on this site share this single stylesheet.
   Colours and fonts are set as variables at the top so they
   are easy to adjust in one place.
   ============================================================ */


/* ---- Colour and font variables ---- */
:root {
  --green:       #006234;   /* SDU green — used for accents and active states */
  --nav-bg:      #1d2c3f;   /* Dark navy — navigation bar background */
  --nav-text:    #ffffff;
  --text:        #333333;   /* Main body text */
  --text-light:  #666666;   /* Secondary text (authors, dates, etc.) */
  --bg:          #ffffff;   /* Page background */
  --bg-alt:      #f5f7f5;   /* Slightly tinted alternate background for sections */
  --border:      #e0e0e0;   /* Dividers and card borders */
  --link:        #0055a5;   /* Hyperlink blue */
  --link-hover:  #003d7a;
  --max-width:   960px;     /* Maximum content width */
  --font-body:   Georgia, 'Times New Roman', serif;
  --font-ui:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}


/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--link);
  text-decoration: underline;
}

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

ul {
  list-style: none;
}


/* ============================================================
   LAYOUT UTILITY
   ============================================================ */
/* Centres content and adds side padding */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* A simple section wrapper with vertical spacing */
.section {
  padding: 56px 0;
}

.section--alt {
  background: var(--bg-alt);
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-ui);
  line-height: 1.3;
  color: #1a1a1a;
}

h1 { font-size: 2rem;   margin-bottom: 0.5em; }
h2 { font-size: 1.5rem; margin-bottom: 0.5em; }
h3 { font-size: 1.2rem; margin-bottom: 0.4em; }
h4 { font-size: 1rem;   margin-bottom: 0.3em; }

/* Small eyebrow text above a heading */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: 8px;
}

p {
  margin-bottom: 1em;
}

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


/* ============================================================
   NAVIGATION
   ============================================================ */
.main-nav {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.main-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

/* Logo / site name on the left */
.nav-logo {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nav-text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-logo span {
  color: #7bba8e; /* lighter green for "MSOE" portion */
}

/* Horizontal link list */
.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links li a {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}

.nav-links li a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* The currently active page */
.nav-links li a.active {
  background: var(--green);
  color: #fff;
}

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--nav-text);
  font-size: 1.4rem;
  line-height: 1;
}


/* ============================================================
   FOOTER
   ============================================================ */
.main-footer {
  background: var(--nav-bg);
  color: rgba(255,255,255,0.65);
  padding: 24px 0;
  margin-top: 64px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
}

.main-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-nav {
  display: flex;
  gap: 16px;
}

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

.footer-nav a:hover {
  color: #fff;
}


/* ============================================================
   HOME PAGE
   ============================================================ */

/* Hero banner — group introduction */
.hero {
  background: linear-gradient(135deg, var(--nav-bg) 0%, #2a4a30 100%);
  color: #fff;
  padding: 72px 0 64px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero__text h1 {
  font-size: 2.4rem;
  color: #fff;
  margin-bottom: 0.4em;
}

.hero__text h1 span {
  color: #7bba8e;
}

.hero__text p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
}

.hero__text .hero-links {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn--primary {
  background: var(--green);
  color: #fff;
}

.btn--primary:hover {
  background: #004d27;
  color: #fff;
}

.btn--outline {
  border: 2px solid rgba(255,255,255,0.5);
  color: #fff;
}

.btn--outline:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Group photo placeholder on hero right side */
.hero__image img {
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.hero__image-placeholder {
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 2px dashed rgba(255,255,255,0.25);
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 24px;
}

/* Three-pillar grid (Simulation / Optimisation / Experimentation) */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.pillar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--green);
  border-radius: 4px;
  padding: 28px 24px;
}

.pillar h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--green);
}

.pillar p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* Application domains grid */
.domains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.domain-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px 20px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* Collaborations list on home */
.collab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.collab-group h4 {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 10px;
}

.collab-group ul {
  list-style: none;
  padding: 0;
}

.collab-group ul li {
  font-size: 0.9rem;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}


/* ============================================================
   BIOGRAPHY PAGE
   ============================================================ */
.bio-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

.bio-photo img {
  border-radius: 4px;
  width: 100%;
}

.bio-photo .social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.bio-photo .social-icons a {
  display: block;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.bio-photo .social-icons a:hover {
  opacity: 1;
}

.bio-photo .social-icons img {
  width: 29px;
  height: 29px;
}

.bio-contact {
  margin-top: 20px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.8;
}

.bio-contact a {
  color: var(--link);
}

/* Timeline table used in biography */
.timeline {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.95rem;
}

.timeline td {
  padding: 8px 12px 8px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.timeline td:first-child {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-light);
  white-space: nowrap;
  padding-right: 24px;
  min-width: 120px;
}

.timeline tr:last-child td {
  border-bottom: none;
}


/* ============================================================
   PUBLICATIONS PAGE
   ============================================================ */

/* Filter controls bar */
.pub-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
  padding: 16px 0;
  border-bottom: 2px solid var(--border);
}

.pub-filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pub-filter-btn {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  color: var(--text);
}

.pub-filter-btn:hover,
.pub-filter-btn.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.pub-search {
  flex: 1;
  min-width: 180px;
  max-width: 300px;
}

.pub-search input {
  width: 100%;
  padding: 6px 12px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
}

.pub-search input:focus {
  border-color: var(--green);
}

/* Count display */
.pub-count {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-light);
  margin-left: auto;
}

/* Year group heading */
.pub-year-heading {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--green);
}

/* Individual publication entry */
.pub-entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.pub-title {
  font-weight: bold;
  font-size: 0.98rem;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.pub-authors {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-light);
  display: block;
  margin-bottom: 3px;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Small pill-style link badges */
.pub-link {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 3px;
  text-decoration: none;
  color: var(--link);
  transition: background 0.12s, color 0.12s;
}

.pub-link:hover {
  background: var(--link);
  color: #fff;
  border-color: var(--link);
}

/* Open-access badge */
.pub-oa {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  background: #e8f5ee;
  color: var(--green);
  border: 1px solid #b2d9c0;
  border-radius: 3px;
}

/* "Under review" badge */
.pub-review-badge {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffd966;
  border-radius: 3px;
}

/* Empty state when no results match filter */
.pub-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--text-light);
  font-family: var(--font-ui);
}


/* ============================================================
   PRESENTATIONS PAGE
   ============================================================ */
.pres-entry {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.pres-title {
  font-weight: bold;
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.pres-authors {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 3px;
}

.pres-venue {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.pres-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Reuse .pub-link for presentation links */


/* ============================================================
   GROUP PAGE
   ============================================================ */
.member-card {
  display: flex;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.member-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--bg-alt);
}

.member-photo-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 4px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 2rem;
}

.member-info h3 {
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.member-role {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  margin-bottom: 8px;
}

.member-desc {
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.member-funding {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-light);
}

/* Past members — smaller, no photos */
.past-section h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  font-family: var(--font-ui);
  margin: 24px 0 8px;
}

.past-list {
  list-style: none;
  padding: 0;
  font-size: 0.9rem;
  color: var(--text);
}

.past-list li {
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
}

.past-list li span {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Thesis students — compact table */
.thesis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 12px;
}

.thesis-table td, .thesis-table th {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.thesis-table th {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  text-align: left;
}


/* ============================================================
   PROJECTS PAGE
   ============================================================ */
.project-card {
  border: 1px solid var(--border);
  border-left: 5px solid var(--green);
  border-radius: 4px;
  padding: 28px 28px 24px;
  margin-bottom: 28px;
  background: var(--bg);
}

.project-card h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

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

.project-tag {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-light);
}

.project-tag--funding {
  background: #e8f5ee;
  border-color: #b2d9c0;
  color: var(--green);
}

.project-desc {
  font-size: 0.93rem;
  margin-bottom: 10px;
}

.project-people {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.project-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Reuse .btn for project links */


/* ============================================================
   PAGE HEADER (shared across inner pages)
   ============================================================ */
.page-header {
  background: var(--nav-bg);
  color: #fff;
  padding: 40px 0 36px;
  margin-bottom: 48px;
}

.page-header h1 {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 8px;
}

.page-header p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  margin: 0;
}


/* ============================================================
   RESPONSIVE — Mobile (max 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* Navigation: switch to vertical dropdown */
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    padding: 12px 16px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    gap: 2px;
  }

  .nav-links.open {
    display: flex;
  }

  .main-nav .container {
    position: relative;
  }

  /* Home hero: stack vertically */
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__image {
    order: -1; /* show image above text on mobile */
  }

  /* Pillars: 1 column on small screens */
  .pillars {
    grid-template-columns: 1fr;
  }

  /* Domains: 2 columns on small screens */
  .domains {
    grid-template-columns: 1fr 1fr;
  }

  /* Biography: stack vertically */
  .bio-layout {
    grid-template-columns: 1fr;
  }

  .bio-photo img {
    max-width: 200px;
  }

  /* Group members: stack photo and text */
  .member-card {
    flex-direction: column;
  }

  .member-photo,
  .member-photo-placeholder {
    width: 120px;
    height: 120px;
  }

  /* Collaborations: 1 column */
  .collab-grid {
    grid-template-columns: 1fr;
  }

  /* Footer: stack */
  .main-footer .container {
    flex-direction: column;
    text-align: center;
  }

  h1 { font-size: 1.6rem; }
  .hero__text h1 { font-size: 1.8rem; }

}

@media (max-width: 480px) {
  .domains {
    grid-template-columns: 1fr;
  }

  .pub-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .pub-search {
    max-width: 100%;
  }
}
