:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #5f6368;
  --accent: #1a73e8;
  --border: #e0e0e0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1e1e1e;
    --text: #f1f1f1;
    --text-secondary: #a0a0a0;
    --accent: #8ab4f8;
    --border: #333333;
    --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.nav-brand {
  font-weight: 500;
  font-size: 1.05rem;
  padding: 16px 20px 16px 0;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 18px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

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

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

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

h1 {
  font-size: 1.9rem;
  font-weight: 500;
  margin: 0 0 6px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 0 0 32px;
}

h2 {
  font-size: 1.15rem;
  font-weight: 500;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h2:first-of-type { margin-top: 0; }

.card {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 500;
}

.card .meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 0 10px;
}

.card p { margin: 0; }

.card h3 a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.card h3 a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.links a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 18px;
  font-size: 0.95rem;
}

.links a:hover { text-decoration: underline; }

.tag {
  display: inline-block;
  background: rgba(26,115,232,0.1);
  color: var(--accent);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 0.8rem;
  margin: 2px 6px 2px 0;
}

footer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 24px;
}

.pdf-embed {
  width: 100%;
  height: 80vh;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 8px;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  height: 260px;
  width: auto;
  max-width: 100%;
  border-radius: 6px;
  display: block;
}

.gallery figcaption {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 100%;
}

@media (max-width: 600px) {
  .gallery img {
    height: auto;
    width: 100%;
  }
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
