/*
 * Modern stylesheet for Stefan Koelsch's personal website.
 *
 * This CSS emphasises readability, trustworthiness and a modern aesthetic.
 * It defines a consistent colour palette and responsive layouts for all pages.
 */

/* Colour palette variables for easy tweaking */
:root {
  --primary-color: #002366;       /* deep navy for professionalism and trust */
  --secondary-color: #004ea8;     /* lighter blue for accents and buttons */
  --accent-color: #c62828;        /* red accent for highlights and important items */
  --background-color: #f7f9fc;    /* very light grey for page backgrounds */
  --text-color: #333333;          /* dark grey for body text */
}

/* Global resets and basic typography */
html, body {
  margin: 0;
  padding: 0;
  font-family: "Arial", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
}

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

h1, h2, h3 {
  margin-top: 0;
  font-weight: bold;
  color: var(--primary-color);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.8rem; margin-bottom: 1rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }

/* Navbar styling */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar .logo {
  font-weight: bold;
  font-size: 1.25rem;
  margin-right: 1.5rem; /* space between logo and navigation */
}
.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  margin-left: auto; /* push navigation to the right of the logo */
}
.navbar li {
  margin-left: 1.25rem;
}
/* give extra spacing between the logo and the first nav item */
/* no extra margin needed on first item now because the list is right‑aligned */
.navbar a {
  color: #ffffff;
  font-weight: bold;
  transition: color 0.2s ease;
}
.navbar a:hover {
  color: var(--secondary-color);
}

/* Hero section for home page */
.hero {
  background: url('images/hero.png') center/cover no-repeat;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  padding: 2rem 1rem;
}
.hero .hero-content {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  border-radius: 8px;
}
.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: #ffffff;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #e5e7eb;
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--secondary-color);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
.btn:hover {
  background-color: var(--primary-color);
}

/* Section containers */
section {
  padding: 2rem 1rem;
  margin: 0 auto;
  max-width: 1000px;
}

/* About and general paragraphs */
section p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* Research grid */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.research-item {
  background-color: #ffffff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Book grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.book-card {
  background-color: #ffffff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
}
.book-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.book-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}
.book-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Publication list */
.publication-list {
  list-style: none;
  padding: 0;
}
.publication-list li {
  margin-bottom: 0.75rem;
}

/* Stimuli section */
.stimuli p {
  margin-bottom: 1rem;
}

/* Subpage header styling */
.subpage-header {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 2rem 1rem 1rem;
  text-align: center;
}
.subpage-header h1 {
  margin-top: 0.5rem;
  color: #ffffff;
}

/* Media page lists */
.media ul {
  list-style: none;
  padding-left: 0;
}
.media li {
  margin-bottom: 1rem;
}

/* Highlight class used to emphasise major media appearances */
.highlight {
  color: var(--accent-color);
  font-weight: bold;
}

/* Footer styling */
footer {
  background-color: var(--primary-color);
  color: #ffffff;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.85rem;
  margin-top: 2rem;
}
footer a {
  color: var(--secondary-color);
}
footer a:hover {
  color: var(--accent-color);
}