/* AI4Science Lab Cologne - Modern Dark Theme */

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200;0,6..12,300;0,6..12,400;0,6..12,700;1,6..12,300;1,6..12,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;700&display=swap');

:root {
  --primary-color: #452c82;      /* Deep purple */
  --primary-dark: #362268;
  --secondary-color: #7b1fa2;    /* Deep purple - innovation */
  --accent-color: #f57c00;       /* Warm orange for highlights */
  --bg-light: #ffffff;           /* White background */
  --bg-lighter: #fafafa;         /* Very light gray */
  --bg-card: #f5f5f5;            /* Card background */
  --text-primary: #212121;       /* Dark text */
  --text-secondary: #616161;     /* Gray for secondary text */
  --border-color: #e0e0e0;       /* Light borders */
  --success-color: #388e3c;      /* Green for positive elements */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-light);
  color: var(--text-primary);
  font-family: 'Nunito Sans', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  font-weight: 400;
}

/* ============================================
   Hero Section - Modern Dark Design
   ============================================ */

/* Pull hero section up under the fixed navbar on homepage only */
body.nav-fixed:has(.hero-section) {
  padding-top: 0 !important;
}

body.nav-fixed:has(.hero-section) #quarto-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.hero-section:first-child {
  margin-top: 0 !important;
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('images/startpage_background_luke_jones_unsplash.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
  padding: 3rem 2rem;
  border-bottom: 1px solid var(--border-color);
  margin-top: 0 !important;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 0;
}

.hero-section::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(123, 31, 162, 0.08) 0%, transparent 70%);
  bottom: -250px;
  left: -150px;
  border-radius: 50%;
  z-index: 0;
}

.hero-content {
  max-width: 900px;
  text-align: center;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: #ffffff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.hero-content h3 {
  font-size: 1.5rem;
  color: #f0f0f0;
  font-weight: 300;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.hero-content p {
  font-size: 1.2rem;
  color: #e8e8e8;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary, .btn-secondary, .btn-primary-large {
  display: inline-block;
  padding: 0.875rem 2rem;
  margin: 0.5rem;
  border-radius: 0;
  text-decoration: none;
  font-weight: 400;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(69, 44, 130, 0.3);
}

.btn-secondary {
  background: var(--primary-color);
  border: 2px solid var(--primary-color);
  color: white;
}

.btn-secondary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(69, 44, 130, 0.3);
  color: white;
}

.btn-primary-large {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

.btn-primary-large:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(69, 44, 130, 0.3);
}

/* ============================================
   Features Section
   ============================================ */

.features-section {
  padding: 6rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.features-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 4rem;
  color: var(--text-primary);
  font-weight: 300;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: white;
  padding: 2.5rem;
  border-radius: 0;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  background: var(--bg-lighter);
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-weight: 300;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
  padding: 6rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(123, 31, 162, 0.05) 0%, rgba(25, 118, 210, 0.05) 100%);
  margin: 4rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.cta-section p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
  padding: 4rem 2rem 2rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 300;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* ============================================
   Person Cards
   ============================================ */

.person-card {
  background: white;
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 0;
  transition: all 0.3s ease;
  height: 100%;
}

.person-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.person-card h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  font-weight: 300;
}

.person-card h4 {
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 1rem;
}

.person-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  margin: 1rem auto 1rem 0;
  display: block;
  border: 2px solid var(--border-color);
  border-radius: 0;
}

/* ============================================
   Research Areas
   ============================================ */

.research-area {
  background: white;
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary-color);
  border-radius: 0;
  margin-bottom: 3rem;
  transition: all 0.3s ease;
}

.research-area:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.research-area h3 {
  color: var(--text-primary);
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.research-area h4 {
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.research-area p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   Publications
   ============================================ */

.publication {
  background: white;
  padding: 1.75rem;
  border: 1px solid var(--border-color);
  border-left: 2px solid var(--primary-color);
  border-radius: 0;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.publication:hover {
  border-left-width: 4px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.publication strong:first-child {
  color: var(--text-primary);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.publication em {
  color: var(--text-secondary);
  font-style: normal;
  display: block;
  margin-bottom: 0.25rem;
}

.publication a {
  color: var(--primary-color);
  text-decoration: none;
  margin-right: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.publication a:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

/* ============================================
   News Items
   ============================================ */

.news-item {
  background: white;
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 0;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.news-item:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.news-item h4 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.news-item em {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 1rem;
}

.news-preview {
  background: var(--bg-card);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary-color);
  border-radius: 0;
  margin: 3rem 0;
}

.news-preview p {
  color: var(--text-primary);
}

.news-preview p {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

/* ============================================
   Contact Boxes
   ============================================ */

.contact-box {
  background: white;
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 0;
  margin: 2rem 0;
}

.contact-box strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.5rem;
}

.contact-box p {
  color: var(--text-secondary);
}

/* ============================================
   Generic Buttons
   ============================================ */

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  text-decoration: none;
  font-weight: 400;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  cursor: pointer;
  border-radius: 0;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* ============================================
   Callouts
   ============================================ */

.callout {
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  border-left: 3px solid;
  border-radius: 0;
  background: white;
}

.callout-note {
  border-color: var(--primary-color);
}

.callout-important {
  border-color: #f59e0b;
}

.callout-warning {
  border-color: #ef4444;
}

.callout-tip {
  border-color: #10b981;
}

/* ============================================
   Code Blocks
   ============================================ */

pre {
  background: #f5f5f5;
  color: var(--text-primary);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0;
  overflow-x: auto;
  margin: 1.5rem 0;
}

code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
}

:not(pre) > code {
  background: #f5f5f5;
  color: var(--primary-color);
  padding: 0.2rem 0.4rem;
  font-size: 0.85em;
  border: 1px solid var(--border-color);
  border-radius: 0;
}

/* ============================================
   Tables
   ============================================ */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 0;
  overflow: hidden;
}

thead {
  background: var(--bg-card);
  color: var(--text-primary);
  border-bottom: 2px solid var(--primary-color);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

tr:hover {
  background: var(--bg-lighter);
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
  background: #f0eeeb !important;
  backdrop-filter: blur(10px);
  border-bottom: none;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  align-items: flex-end;
  margin-bottom: 0;
}

.navbar > .navbar-container,
.navbar > .container-fluid {
  align-items: flex-end !important;
}

.navbar-collapse {
  align-items: flex-end !important;
}

.navbar-brand {
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--text-primary) !important;
}

.navbar-brand.navbar-brand-logo {
  padding: 0;
  margin: 0;
  line-height: 0;
}

.navbar-logo {
  max-height: 140px;
  width: auto;
}

.navbar-brand img {
  height: auto;
  width: auto;
  max-height: 140px;
  max-width: 400px;
  display: block;
  margin-bottom: 0;
  padding-bottom: 0;
  vertical-align: top;
}

.navbar-nav {
  align-items: flex-end !important;
  align-self: flex-end !important;
}

.nav-item {
  align-self: flex-end !important;
}

.navbar-nav .nav-link {
  color: #4A4A4A !important;
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  padding: 0.5rem 0.5rem;
  padding-bottom: 1rem;
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: bottom;
}

/* Align all navbar children to bottom */
.navbar .container-fluid > * {
  align-self: flex-end !important;
}

#quarto-search {
  margin-bottom: 0.75rem !important;
  margin-top: auto !important;
}

.navbar-collapse {
  align-self: flex-end !important;
}

.navbar-nav.navbar-nav-scroll.ms-auto {
  align-self: flex-end !important;
  margin-bottom: 0 !important;
}

.navbar-nav.navbar-nav-scroll.ms-auto .nav-item.compact .nav-link {
  padding-bottom: 0.6rem;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
}

/* ============================================
   Footer
   ============================================ */

.page-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.page-footer a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.page-footer a:hover {
  color: var(--primary-color);
}

/* ============================================
   Title Block
   ============================================ */

.quarto-title-banner {
  background: white;
  color: var(--text-primary);
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

.quarto-title-banner .title {
  color: var(--text-primary);
  font-weight: 300;
  font-size: 2rem;
}

.quarto-title-banner .subtitle {
  color: var(--text-secondary);
  font-weight: 400;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 991px) {
  .navbar-logo,
  .navbar-brand img {
    max-height: 60px;
    content: url('images/ai4science_logo_mobile.png');
  }

  .nav-item {
    margin-top: 0;
  }

  .navbar {
    align-items: center;
    background: #452c82 !important;
  }

  .navbar-toggler {
    margin-bottom: 0.25rem;
    border-color: rgba(255, 255, 255, 0.5) !important;
  }

  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  }

  .navbar-nav .nav-link {
    color: #ffffff !important;
  }

  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link.active,
  .navbar-nav .nav-link:focus,
  .navbar-nav .nav-link:visited {
    color: rgba(255, 255, 255, 0.75) !important;
  }

  #quarto-search {
    margin-bottom: 0.5rem !important;
    color: #ffffff !important;
  }

  #quarto-search .aa-SubmitIcon,
  #quarto-search svg {
    color: #ffffff !important;
    fill: #ffffff !important;
  }

  .nav-link.nav-item-compact .bi {
    color: #ffffff !important;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content h3 {
    font-size: 1.2rem;
  }
  
  .feature-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .person-photo {
    width: 120px;
    height: 120px;
  }

  .navbar-logo,
  .navbar-brand img {
    max-height: 40px;
    content: url('images/ai4science_logo_mobile.png');
  }
}


/* ============================================
   Utility Classes
   ============================================ */

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.p-4 {
  padding: 2rem;
}

/* ============================================
   Grid System
   ============================================ */

.grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.g-col-12 {
  grid-column: span 12;
}

.g-col-md-4 {
  grid-column: span 4;
}

.g-col-md-6 {
  grid-column: span 6;
}

@media (max-width: 768px) {
  .g-col-md-4,
  .g-col-md-6 {
    grid-column: span 12;
  }
}
