/*
 * Stylesheet for CognitiveScientist.net
 *
 * This file defines the core styling for the static website. The design
 * prioritizes readability, responsive layouts and minimal external
 * dependencies to ensure fast load times. Colors are chosen for high
 * contrast, and typefaces rely on common system fonts to avoid
 * downloading web fonts. Feel free to tweak sizes and colors to
 * customize the look further.
 */

/* Reset some basic elements */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Header and navigation */
header {
  background-color: #1e3a5f;
  color: #fff;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header .nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

header .logo {
  font-size: 1.5em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

header nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.3s ease;
}

header nav ul li a:hover,
header nav ul li a:focus {
  color: #dcdcdc;
}

/* Mobile navigation toggle */
#nav-toggle {
  display: none;
}

header .mobile-icon {
  display: none;
  cursor: pointer;
}

/* Hero section */
.hero {
  background-image: url('../images/placeholder9.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 100px 20px;
}

.hero h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.1em;
  max-width: 700px;
  margin: 0 auto;
}

/* Sections */
section {
  padding: 40px 0;
  background-color: #fff;
  margin-bottom: 20px;
}

section.alt {
  background-color: #f0f4f8;
}

section h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: #1e3a5f;
}

section p {
  margin-bottom: 20px;
  line-height: 1.7;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card .content {
  padding: 15px;
}

.card h3 {
  font-size: 1.25em;
  margin-bottom: 10px;
  color: #1e3a5f;
}

.card p {
  font-size: 0.9em;
  color: #555;
}

.card a {
  display: inline-block;
  margin-top: 10px;
  color: #1e3a5f;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.card a:hover,
.card a:focus {
  color: #0d1f31;
}

/* Blog list */
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.blog-post-preview {
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.blog-post-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.blog-post-preview .preview-content {
  padding: 15px;
}

.blog-post-preview h3 {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #1e3a5f;
}

.blog-post-preview p {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 15px;
}

.blog-post-preview a {
  color: #1e3a5f;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-post-preview a:hover,
.blog-post-preview a:focus {
  color: #0d1f31;
}

/* Article styling */
.article-header {
  background-color: #1e3a5f;
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}

.article-header h1 {
  font-size: 2.2em;
  margin-bottom: 10px;
}

.article-header p {
  font-size: 1em;
  opacity: 0.9;
}

article {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 15px;
}

article h2 {
  font-size: 1.6em;
  margin-top: 25px;
  margin-bottom: 10px;
  color: #1e3a5f;
}

article h3 {
  font-size: 1.3em;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #1e3a5f;
}

article p {
  margin-bottom: 15px;
  line-height: 1.7;
  color: #444;
}

article img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 4px;
}

article ul {
  margin-left: 20px;
  margin-bottom: 20px;
  list-style: disc;
}

article ul li {
  margin-bottom: 10px;
}

/* Footer */
footer {
  background-color: #1e3a5f;
  color: #fff;
  padding: 20px 0;
  margin-top: auto;
}

footer .footer-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

footer .footer-col {
  flex: 1 1 200px;
}

footer h4 {
  font-size: 1.2em;
  margin-bottom: 10px;
  color: #fff;
}

footer ul {
  list-style: none;
}

footer ul li {
  margin-bottom: 8px;
}

footer ul li a {
  color: #dcdcdc;
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.3s ease;
}

footer ul li a:hover,
footer ul li a:focus {
  color: #fff;
}

footer .copyright {
  text-align: center;
  margin-top: 20px;
  font-size: 0.8em;
  opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
  header nav ul {
    display: none;
    flex-direction: column;
    background-color: #1e3a5f;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  }
  header nav ul.open {
    display: flex;
  }
  header .mobile-icon {
    display: block;
    color: #fff;
    font-size: 1.5em;
  }
}