/* ==========================================================================
   Efraim Talmon (1925 - 2009) Memorial Website
   Clean, modern, responsive styles for GitHub Pages
   ========================================================================== */

:root {
  --bg-color: #fafaf9;
  --surface-color: #ffffff;
  --text-color: #262626;
  --text-muted: #666666;
  --border-color: #e5e5e5;
  --link-color: #1a56db;
  --link-hover: #1e40af;
  --nav-bg: #1e293b;
  --nav-text: #e2e8f0;
  --nav-hover: #ffffff;
  --nav-active: #38bdf8;
  --quote-border: #94a3b8;
  --max-width: 840px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121417;
    --surface-color: #1a1d21;
    --text-color: #e4e4e7;
    --text-muted: #a1a1aa;
    --border-color: #2e333b;
    --link-color: #60a5fa;
    --link-hover: #93c5fd;
    --nav-bg: #0f172a;
    --nav-text: #cbd5e1;
    --nav-hover: #ffffff;
    --nav-active: #38bdf8;
    --quote-border: #475569;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-color);
  padding: 0;
  margin: 0;
}

.site-header {
  background-color: var(--nav-bg);
  color: #ffffff;
  padding: 1.75rem 1rem 1.25rem;
  text-align: center;
  border-bottom: 3px solid #0284c7;
}

.site-header h1 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 1rem 0;
}

.site-header h1 a {
  color: #ffffff;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav a {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  color: var(--nav-hover);
  background-color: rgba(255, 255, 255, 0.1);
}

.site-nav a.active {
  color: var(--nav-active);
  font-weight: 600;
  background-color: rgba(56, 189, 248, 0.12);
}

.container {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1.25rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

h2 {
  font-size: 1.45rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

p {
  margin-bottom: 1.25rem;
}

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

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

blockquote {
  border-left: 4px solid var(--quote-border);
  padding: 0.85rem 1.25rem;
  margin: 1.5rem 0;
  background-color: var(--surface-color);
  border-radius: 0 6px 6px 0;
  font-style: italic;
}

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

blockquote .attribution {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  font-style: normal;
  color: var(--text-muted);
}

figure {
  margin: 1.75rem 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: inline-block;
}

figcaption {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
}

hr {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin: 2rem 0;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.75rem 0;
}

.image-grid figure {
  margin: 0;
}

.site-footer {
  margin-top: 3.5rem;
  padding: 2rem 1.25rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.site-footer p {
  margin-bottom: 0.4rem;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  
  .site-header h1 {
    font-size: 1.5rem;
  }
  
  .site-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }
}
