/* KU Leuven Computer Museum — Modern CSS */
/* Aesthetic: archival/editorial — referencing the era of the content */

/* @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,600;1,400&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,600;1,400&family=IBM+Plex+Serif:ital,wght@0,400;0,600;1,400&display=swap'); */

@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&family=IBM+Plex+Mono&display=swap');

:root {
  --bg:         #f5f2eb;
  --bg-alt:     #ede9df;
  --fg:         #1a1a1a;
  --fg-muted:   #555;
  --accent:     #003d8f;   /* KU Leuven blue */
  --accent2:    #c8a84b;   /* gold accent */
  --rule:       #c8bfa8;
  --mono-bg:    #1e1e2e;
  --mono-fg:    #cdd6f4;
  --font-sans:  'Share Tech Mono', monospace;
  --font-serif: 'VT323', monospace;
  --font-mono:  'IBM Plex Mono', monospace;
/*  --font-sans:  'IBM Plex Sans', sans-serif;
  --font-serif: 'IBM Plex Serif', serif;
  --font-mono:  'IBM Plex Mono', monospace; */
}

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

html { font-size: 19px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ──────────────────────────────────────── */
header {
  background: var(--accent);
  color: white;
  padding: 0;
  border-bottom: 4px solid var(--accent2);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-logo {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent2);
  letter-spacing: 0.05em;
  white-space: pre;
  line-height: 1.2;
  opacity: 0.9;
}

.header-title {
  flex: 1;
}

.site-wordmark {
  display: block;
  text-decoration: none;
  line-height: 1;
}

.wordmark-main {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: white;
  text-transform: uppercase;
}

.wordmark-main em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.02em;
}

.wordmark-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  margin-top: 0.35rem;
  text-transform: uppercase;
}

.site-wordmark:hover .wordmark-main { color: rgba(255,255,255,0.9); }
.site-wordmark:hover .wordmark-sub  { color: rgba(255,255,255,0.7); }

/* ── Navigation ──────────────────────────────────── */
nav {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
}

nav a {
  display: block;
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav a:hover, nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Main content ────────────────────────────────── */
main {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  width: 100%;
}

/* ── Breadcrumb ──────────────────────────────────── */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--rule); margin: 0 0.4rem; }

/* ── Article ─────────────────────────────────────── */
article {
  max-width: 680px;
}

article h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

article p {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 1.2rem;
  color: var(--fg);
}

article ul, article ol {
  font-family: var(--font-serif);
  margin: 1rem 0 1.2rem 1.5rem;
}

article li { margin-bottom: 0.4rem; }

article h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  margin: 2rem 0 0.8rem;
}

article a { color: var(--accent); }
article a:hover { color: var(--accent2); }

/* ── Terminal / PRE blocks ───────────────────────── */
.terminal {
  background: var(--mono-bg);
  color: var(--mono-fg);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-left: 3px solid var(--accent2);
  white-space: pre-wrap;
}

.terminal::before {
  content: '$ ';
  color: var(--accent2);
  display: none;
}

.terminal-header {
  background: #2a2a3e;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.4rem 1rem;
  border-radius: 4px 4px 0 0;
  margin-bottom: -4px;
  text-transform: uppercase;
}

/* ── Index / card grid ───────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.card {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.3rem 1.5rem;
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,61,143,0.1);
}

.card-year {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.card-excerpt {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* ── Prev/Next navigation ────────────────────────── */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  gap: 1rem;
}

.page-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.page-nav a:hover { color: var(--accent2); }
.page-nav .prev::before { content: '←'; }
.page-nav .next::after  { content: '→'; }

/* ── Language toggle ─────────────────────────────── */
.lang-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.lang-toggle a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  text-decoration: none;
  color: var(--fg-muted);
  transition: all 0.15s;
}

.lang-toggle a.active, .lang-toggle a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ── Footer ──────────────────────────────────────── */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--rule);
  padding: 1.5rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-muted);
  letter-spacing: 0.03em;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 600px) {
  .header-logo { display: none; }
  .header-title h1 { font-size: 1.2rem; }
  main { padding: 1.5rem 1rem; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ── Sidebar layout ──────────────────────────────── */
.site-body {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  gap: 0;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  padding: 1.5rem 0 2rem 1.5rem;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--rule);
  scrollbar-width: thin;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem;
}

/* ── Sidebar nav ─────────────────────────────────── */
.sidebar-nav {
  font-family: var(--font-mono);
}

.nav-section {
  margin-bottom: 1.2rem;
}

.nav-section-title {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
  padding: 0.3rem 0 0.3rem 0.5rem;
  border-left: 2px solid var(--accent2);
  margin-bottom: 0.3rem;
}

.nav-section-title a {
  color: var(--fg-muted);
  text-decoration: none;
}
.nav-section-title a:hover { color: var(--accent); }

.nav-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-items li { margin: 0; }

.nav-items a {
  display: block;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  color: var(--fg-muted);
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.1s, color 0.1s;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.nav-items a:hover {
  background: var(--bg-alt);
  color: var(--accent);
}

.nav-items a.active {
  background: var(--accent);
  color: white;
  font-weight: 400;
}

/* ── Header lang switcher ────────────────────────── */
.header-lang {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
  align-items: center;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 2px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.15s;
}

.lang-btn.active {
  background: rgba(255,255,255,0.15);
  color: white;
  border-color: rgba(255,255,255,0.6);
}

.lang-btn:hover:not(.active) {
  background: rgba(255,255,255,0.1);
  color: white;
}

/* ── Remove old top-level nav bar (replaced by sidebar) */
nav.top-nav { display: none; }

/* ── Responsive: collapse sidebar on small screens ─ */
@media (max-width: 800px) {
  .site-body { flex-direction: column; }
  .sidebar {
    width: 100%;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 1rem;
    overflow: hidden;
  }
  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem;
  }
  .nav-section { margin-bottom: 0; }
  .main-content { padding: 1.5rem 1rem; }
}

/* ── Kerst index list ────────────────────────────── */
.kerst-list {
  list-style: none;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}
.kerst-list a {
  display: block;
  padding: 0.6rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 3px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  transition: background 0.15s, border-color 0.15s;
}
.kerst-list a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ── Photo gallery ───────────────────────────────── */
.photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.photo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 0.4rem;
  transition: opacity 0.15s;
}

.photo-item:hover { opacity: 0.8; }

.photo-item img {
  border: 1px solid var(--rule);
  display: block;
  object-fit: cover;
}

.photo-caption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-align: center;
}

.photo-fullsize {
  margin: 1.5rem 0;
  text-align: center;
}

.photo-nav {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.photo-nav a { color: var(--accent); }
