/* ============================================================
   Diskrete Materie-Kinematik — gemeinsames Stylesheet
   Palette knüpft an die bestehende 3D-Visualisierung an.
   ============================================================ */

:root {
  --bg:            #05060d;
  --bg-soft:       #090b15;
  --panel:         #10131f;
  --panel-2:       #151827;
  --panel-border:  #262b40;
  --text-primary:  #e8eaf2;
  --text-secondary:#9aa0b8;
  --text-faint:    #656b85;
  --accent:        #d8ac4a;   /* Gold */
  --accent-soft:   #f0cd85;
  --accent-2:      #6fa8dc;   /* Blau */
  --accent-3:      #8f7fd6;   /* Violett */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(111,168,220,0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(143,127,214,0.09), transparent 55%),
    var(--bg);
  color: var(--text-primary);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent-soft); }

::selection { background: rgba(216,172,74,0.35); color: #fff; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--text-primary); line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--text-secondary); max-width: 72ch; }
.lede { font-size: 1.15rem; color: var(--text-primary); max-width: 62ch; }

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

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5,6,13,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-border);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; color: var(--text-primary); font-family: var(--serif); font-size: 1.05rem; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-soft), var(--accent) 45%, #7a5a17 100%);
  box-shadow: 0 0 14px rgba(216,172,74,0.45);
  flex-shrink: 0;
}
.brand small { display: block; color: var(--text-faint); font-family: var(--sans); font-size: 0.68rem; font-weight: 400; letter-spacing: 0.02em; }
.nav-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.nav-links a { color: var(--text-secondary); font-size: 0.93rem; white-space: nowrap; padding: 0.3rem 0; border-bottom: 1px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); border-bottom-color: var(--accent); }
.nav-toggle { display: none; }

@media (max-width: 780px) {
  .nav-links { position: fixed; inset: 66px 0 0 0; background: var(--bg); flex-direction: column; padding: 1.5rem 1.75rem; gap: 1.1rem; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all .18s ease; border-bottom: 1px solid var(--panel-border); }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { font-size: 1.05rem; }
  .nav-toggle { display: block; background: none; border: 1px solid var(--panel-border); color: var(--text-primary); width: 38px; height: 38px; border-radius: 8px; font-size: 1.1rem; cursor: pointer; }
}

/* ---------- Hero ---------- */
.hero { padding: 5.5rem 0 4rem; position: relative; overflow: hidden; }
.hero .eyebrow { color: var(--accent); font-size: 0.85rem; letter-spacing: 0.02em; margin-bottom: 0.9rem; font-family: var(--serif); font-style: italic; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 1.1rem; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.8rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.72rem 1.35rem; border-radius: 8px;
  font-size: 0.95rem; font-weight: 500; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: linear-gradient(180deg, var(--accent-soft), var(--accent)); color: #1a1300; }
.btn-primary:hover { filter: brightness(1.06); color: #1a1300; }
.btn-ghost { border-color: var(--panel-border); color: var(--text-primary); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--text-primary); }
.btn-small { padding: 0.45rem 0.9rem; font-size: 0.82rem; border-radius: 6px; }

/* ---------- Sections / panels ---------- */
section { padding: 3.6rem 0; }
section.tight { padding: 2.2rem 0; }
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.8rem 2rem;
}
.section-head { max-width: 68ch; margin-bottom: 2.2rem; }
.section-head .kicker { color: var(--accent-2); font-size: 0.82rem; font-family: var(--serif); font-style: italic; margin-bottom: 0.5rem; }

hr.rule { border: none; border-top: 1px solid var(--panel-border); margin: 3rem 0; }

/* ---------- Card grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1.6rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.card h3 { margin-bottom: 0.1rem; }
.card p { font-size: 0.94rem; margin-bottom: 0.4rem; }
.card .card-link { margin-top: auto; font-size: 0.88rem; }

/* ---------- Publication list ---------- */
.pub-category { margin-bottom: 3.2rem; }
.pub-category-head { display: flex; align-items: baseline; gap: 0.9rem; margin-bottom: 0.4rem; flex-wrap: wrap; }
.pub-category-head h2 { margin-bottom: 0; }
.pub-category-count { color: var(--text-faint); font-size: 0.85rem; }
.pub-category-desc { max-width: 70ch; margin-bottom: 1.5rem; }

.pub-list { display: flex; flex-direction: column; gap: 0.9rem; }
.pub-item {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
}
.pub-item .pub-num { color: var(--text-faint); font-family: var(--mono); font-size: 0.78rem; }
.pub-item h3 { font-size: 1.04rem; margin: 0.15rem 0 0.35rem; }
.pub-item p { font-size: 0.9rem; margin-bottom: 0.4rem; }
.pub-meta { display: flex; gap: 0.9rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-faint); font-family: var(--mono); }
.pub-download { text-align: right; white-space: nowrap; }
@media (max-width: 680px) {
  .pub-item { grid-template-columns: 1fr; }
  .pub-download { text-align: left; }
}

.tag {
  display: inline-block; font-size: 0.72rem; padding: 0.18rem 0.6rem; border-radius: 100px;
  border: 1px solid var(--panel-border); color: var(--text-secondary); font-family: var(--mono);
}
.tag-physik { border-color: rgba(111,168,220,0.4); color: var(--accent-2); }
.tag-chemie { border-color: rgba(216,172,74,0.4); color: var(--accent); }
.tag-biologie { border-color: rgba(140,200,150,0.4); color: #8cc896; }
.tag-bewusstsein { border-color: rgba(143,127,214,0.4); color: var(--accent-3); }
.tag-grundlagen { border-color: rgba(232,234,242,0.35); color: var(--text-primary); }

/* ---------- Author / about ---------- */
.about-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2.5rem; align-items: start; }
.about-portrait { border-radius: 12px; overflow: hidden; border: 1px solid var(--panel-border); }
@media (max-width: 720px) { .about-layout { grid-template-columns: 1fr; } .about-portrait { max-width: 220px; } }

.fact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: 0.55rem; }
.fact-list li { display: flex; gap: 0.6rem; font-size: 0.92rem; color: var(--text-secondary); }
.fact-list b { color: var(--text-primary); font-weight: 600; min-width: 8.5rem; }

/* ---------- Principles list (theorie page) ---------- */
.principle {
  display: grid; grid-template-columns: 44px 1fr; gap: 1.1rem;
  padding: 1.4rem 0; border-top: 1px solid var(--panel-border);
}
.principle:first-of-type { border-top: none; }
.principle .glyph {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--panel-border);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; background: rgba(216,172,74,0.05);
}
.principle h3 { margin-bottom: 0.3rem; }
.principle p { margin-bottom: 0; font-size: 0.95rem; }

figure { margin: 2rem 0; }
figure img { border-radius: 10px; border: 1px solid var(--panel-border); }
figcaption { color: var(--text-faint); font-size: 0.82rem; margin-top: 0.6rem; font-style: italic; }

/* ---------- Notice / framing box ---------- */
.notice {
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--accent-2);
  background: rgba(111,168,220,0.06);
  border-radius: 8px;
  padding: 1.1rem 1.4rem;
  font-size: 0.9rem;
}
.notice p { margin: 0; color: var(--text-secondary); }
.notice p + p { margin-top: 0.6rem; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--panel-border); padding: 3rem 0 2.5rem; margin-top: 2rem; }
footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
footer p { margin: 0; font-size: 0.85rem; color: var(--text-faint); }
footer .foot-links { display: flex; gap: 1.4rem; font-size: 0.85rem; }

/* ---------- misc ---------- */
.center { text-align: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
