@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400&family=Playfair+Display:wght@700&display=swap');

body {
  font-family: 'Lora', serif;
  background-color: #fefaf4;
  color: #222222;
  margin: 0;
  padding: 0;
  font-size: 18px;
  line-height: 1.6;
}

h1, h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin-bottom: 0.5em;
}

/* Layout */
main {
  max-width: 750px;
  margin: 2rem auto;
  padding: 1rem;
}

/* Header */
header {
  background-color: #2c2f54;
  color: #ffffff;
  padding: 2rem 1rem 1rem;
  text-align: center;
  border-bottom: 4px solid #e4ded7;
}

header h1 {
  margin: 0;
  font-size: 2.5em;
}

nav {
  margin-top: 1rem;
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  color: #fdfaf4;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.9em;
  color: #555;
  padding: 2rem 1rem;
  border-top: 1px solid #ddd;
  margin-top: 3rem;
}

/* ===== Articles list ===== */
.lede { margin-top: -0.25rem; color: #555; }

.articles-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 1rem;
}

.article-card {
  display: grid;
  grid-template-columns: 1fr 200px;          /* text left, image right (like Nature) */
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #e3e3e3;
  text-decoration: none;                      /* make whole card clickable */
  color: inherit;
  align-items: center;
}

.article-card:last-child {
  border-bottom: 1px solid #e3e3e3;
}

.article-card:hover .card-title {
  text-decoration: underline;
}

.eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #6b6b6b;
  margin: 0 0 0.35rem 0;
}

.card-title {
  margin: 0 0 0.35rem 0;
  line-height: 1.25;
}

.card-excerpt {
  margin: 0;
  color: #333;
}

.card-media {
  margin: 0;
}

.card-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;                       /* keep thumbnails consistent */
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* Stack on small screens */
@media (max-width: 720px) {
  .article-card {
    grid-template-columns: 1fr;
  }
  .card-media {
    order: -1;                                /* put image above text on mobile */
  }
}

.article-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.article-card .card-media img {
  width: 250px;        /* horizontal size of the thumbnail */
  height: 160px;       /* fixed vertical crop */
  border-radius: 8px;
  object-fit: cover;   /* ensures image fills without distortion */
  object-position: 40% 30%; /* shift crop toward face */
}

.article-header .hero img {
  width: 100%;
  height: auto;           /* keep proportions; change to a fixed height if you prefer a banner crop */
  border-radius: 8px;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* General link styles */
a {
  color: #0044cc;          /* blue that fits your palette */
  text-decoration: underline;
}
a:visited {
  color: #0044cc;          /* keep same color after visiting */
}
a:hover {
  color: #002a80;          /* darker blue on hover */
}

/* Special case: links inside dark banners/hero/figures */
.hero a, 
.hero a:visited, 
.figure-full a, 
.figure-full a:visited {
  color: #ffffff;          /* white for contrast */
  text-decoration: underline;
}
.hero a:hover,
.figure-full a:hover {
  color: #dddddd;          /* lighter gray on hover */
}

/* Nav links */
nav a, nav a:visited {
  color: #ffffff;      /* force white */
  text-decoration: none;
  margin: 0 0.75rem;
}

nav a:hover {
  color: #dddddd;      /* light gray on hover */
}

/* Eyebrow inside hero/header banners */
.hero .eyebrow {
  color: #ffffff;     /* white */
  font-size: inherit; /* match surrounding text size */
  font-weight: 500;   /* optional: a touch bolder than body, lighter than title */
}

