/* OpenD Static Site - Matching opend.org design */

:root {
  --color-primary: #E8174A;
  --color-primary-dark: #c01040;
  --color-text: #333;
  --color-text-light: #666;
  --color-text-lighter: #999;
  --color-border: #e0e0e0;
  --color-bg: #fff;
  --color-bg-light: #f5f7fa;
  --color-bg-author: #eef1f6;
  --max-width: 960px;
  --content-width: 680px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: var(--color-text); }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo span { color: var(--color-primary); }
.language-switcher { display: flex; align-items: center; gap: 0.5rem; }
.language-switcher span { color: var(--color-text-light); font-size: 0.8rem; }
.lang-link {
  color: var(--color-text-light);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 600;
}
.lang-link.active {
  color: #fff;
  background: var(--color-text);
  border-color: var(--color-text);
}
.lang-link:hover:not(.active) { border-color: var(--color-text); color: var(--color-text); }

/* Footer */
.site-footer {
  background: linear-gradient(135deg, var(--color-primary) 0%, #888 100%);
  padding: 2.5rem 0;
  margin-top: 4rem;
  text-align: center;
  color: rgba(255,255,255,0.9);
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.footer-notice { font-size: 0.85rem; opacity: 0.9; margin-bottom: 0.75rem; line-height: 1.5; }
.footer-notice a { color: #fff; text-decoration: underline; }
.footer-notice a:hover { opacity: 0.8; }
.footer-links { font-size: 0.8rem; opacity: 0.7; }
.footer-links a { color: #fff; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* Main container */
.main-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Dissertation page */
.dissertation-header { margin-bottom: 1.5rem; }
.dissertation-header h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  color: #111;
}
.dissertation-header .subtitle {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--color-text-light);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.dissertation-header .organization { font-style: italic; color: var(--color-text-light); margin-bottom: 0.15rem; font-size: 0.95rem; }
.dissertation-header .year { color: var(--color-text-lighter); font-size: 0.85rem; }

/* Section nav */
.section-nav {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.section-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  color: var(--color-text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.section-nav a:hover { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* Content layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
}
.content-main { min-width: 0; overflow-wrap: break-word; word-wrap: break-word; }
@media (max-width: 768px) {
  .content-layout { grid-template-columns: 1fr; }
  .content-sidebar { order: -1; }
}

/* Feature image */
.feature-image { margin-bottom: 2rem; }
.feature-image img { width: 100%; border-radius: 6px; display: block; }
.feature-image figcaption { text-align: right; font-size: 0.75rem; color: var(--color-text-lighter); margin-top: 0.35rem; }

/* Sections */
.section { margin-bottom: 3rem; }
.section h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #111;
}

/* Teaser / Blockquote */
.teaser {
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-text);
  background: var(--color-bg-light);
  border-radius: 0 6px 6px 0;
  line-height: 1.6;
}

/* Extended content */
.extended-content { line-height: 1.8; }
.extended-content p { margin-bottom: 1rem; }
.extended-content h1, .extended-content h2, .extended-content h3 {
  font-family: Georgia, 'Times New Roman', serif;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}
.extended-content img { margin: 1rem 0; border-radius: 4px; }

/* Share links */
.share-links {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.share-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.8rem;
  color: var(--color-text-light);
  transition: border-color 0.15s, color 0.15s;
}
.share-links a:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* Author card */
.author-card {
  background: var(--color-bg-author);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  position: sticky;
  top: 5rem;
}
.author-avatar { border-radius: 50%; width: 100px; height: 100px; object-fit: cover; margin-bottom: 0.75rem; }
.author-avatar-placeholder {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--color-border);
  margin: 0 auto 0.75rem;
}
.author-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.author-bio { font-size: 0.8rem; color: var(--color-text-light); margin-bottom: 1rem; line-height: 1.5; text-align: left; }
.author-social { display: flex; flex-direction: column; gap: 0.35rem; text-align: left; }
.social-link {
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.2rem 0;
  color: var(--color-text-light);
  transition: color 0.15s;
}
.social-link:hover { color: var(--color-primary); }

/* Interview */
.interview-section h2 {
  border-bottom: none;
}
.interview-sidebar { display: flex; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.expertise, .interesting-for { flex: 1; min-width: 200px; }
.expertise h3, .interesting-for h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text-light); }
.expertise ul, .interesting-for ul { padding-left: 1.1rem; }
.expertise li, .interesting-for li { font-size: 0.9rem; margin-bottom: 0.15rem; }

.interview-teaser { margin-bottom: 2rem; }
.interview-bubble {
  background: var(--color-bg-light);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
  max-width: 85%;
}
.interview-bubble.reply { margin-left: auto; background: #e8f4fd; }
.bubble-info { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.bubble-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.bubble-info strong { font-size: 0.85rem; }
.interview-bubble p { font-size: 0.9rem; line-height: 1.5; }
.full-interview { line-height: 1.8; }
.full-interview p { margin-bottom: 1rem; }

/* Full text */
.table-of-contents {
  background: var(--color-bg-light);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--color-primary);
}
.table-of-contents h3 { margin-bottom: 0.5rem; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.03em; }
.toc-list { padding-left: 1.25rem; }
.toc-list li { margin-bottom: 0.25rem; font-size: 0.9rem; }
.toc-list a { text-decoration: none; color: var(--color-text); }
.toc-list a:hover { color: var(--color-primary); }
.fulltext-content { line-height: 1.8; }
.fulltext-content p { margin-bottom: 1rem; }
.fulltext-content h1, .fulltext-content h2, .fulltext-content h3 {
  font-family: Georgia, 'Times New Roman', serif;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.fulltext-content img { margin: 1rem 0; }
.fulltext-content table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.9rem; }
.fulltext-content th, .fulltext-content td { border: 1px solid var(--color-border); padding: 0.5rem; text-align: left; }
.fulltext-content th { background: var(--color-bg-light); }

/* Metadata */
.metadata-section h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.35rem; margin-top: 1.5rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text-light); }
.metadata-section h3:first-child { margin-top: 0; }
.metadata-section .citation { font-size: 0.9rem; line-height: 1.6; }
.metadata-section a { color: var(--color-primary); text-decoration: none; }
.metadata-section a:hover { text-decoration: underline; }
.id-marker { color: var(--color-primary); margin-right: 0.35rem; }
.dnb-link { margin-top: 1.5rem; }
.dnb-link a { font-size: 0.85rem; color: var(--color-primary); }

/* Index page */
.index-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #111;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.dissertation-card {
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.dissertation-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.card-image-wrapper { position: relative; overflow: hidden; }
.card-image { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
}
.card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.card-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  line-height: 1.35;
  color: #111;
}
.card-author { font-size: 0.8rem; color: var(--color-text); font-weight: 600; margin-bottom: 0.1rem; }
.card-org { font-size: 0.75rem; color: var(--color-text-lighter); font-style: italic; margin-bottom: 0.5rem; }
.card-teaser { font-size: 0.8rem; color: var(--color-text-light); flex: 1; margin-bottom: 0.5rem; line-height: 1.5; }
.card-year { font-size: 0.75rem; color: var(--color-text-lighter); }

.category-section { margin-bottom: 3rem; }
.category-section h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: #111;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--color-bg-light) 0%, #e8eaf0 100%);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  margin-top: 3rem;
}
.cta-banner p { font-size: 1rem; color: var(--color-text-light); margin-bottom: 0.25rem; }
.cta-banner h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.cta-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 2rem;
  background: var(--color-text);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.15s;
}
.cta-button:hover { background: var(--color-primary); color: #fff; }

/* Print */
@media print {
  .site-header, .site-footer, .section-nav, .share-links, .cta-banner { display: none; }
  .content-layout { grid-template-columns: 1fr; }
  body { font-size: 11pt; }
}
