:root{
  --bg:#ffffff; --text:#0b1220; --muted:#6b7280; --accent:#0ea5e9; --card:#f8fafc; --shadow: 0 6px 18px rgba(2,6,23,0.08);
}
[data-theme="dark"]{ --bg:#071021; --text:#e6eef6; --muted:#9aa6b2; --accent:#60a5fa; --card:#081223; --shadow:0 6px 18px rgba(2,6,23,0.6); }

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;line-height:1.5;transition:background .22s ease,color .22s ease}

.container{max-width:1000px;margin:2.5rem auto;padding:1rem}

.site-header{background:transparent;padding:.5rem 1rem}
.site-bar{display:flex;gap:1rem;align-items:center;justify-content:space-between;max-width:1000px;margin:0 auto}
.brand{font-weight:700;color:var(--text);text-decoration:none}
.site-nav a{color:var(--muted);text-decoration:none;margin-right:1rem}
.site-nav a:hover{color:var(--text)}

.theme-toggle{border:0;background:var(--card);padding:.35rem;border-radius:10px;display:inline-flex;align-items:center;gap:.4rem;cursor:pointer;box-shadow:var(--shadow);transition:transform .12s ease,background .12s ease}
.theme-toggle:active{transform:scale(.98)}
.theme-toggle .icon{width:18px;height:18px}
.theme-toggle .moon{display:none}
[data-theme="dark"] .theme-toggle .sun{display:none}
[data-theme="dark"] .theme-toggle .moon{display:inline-block}
/* Ensure moon icon is visible in dark mode (force white) */
[data-theme="dark"] .theme-toggle .moon{filter:invert(1) brightness(2);}


main.hero{display:grid;grid-template-columns:1fr;gap:1.25rem;background:linear-gradient(180deg, transparent, transparent);padding:2rem;border-radius:12px}
.card{background:var(--card);padding:1.25rem;border-radius:10px;box-shadow:var(--shadow)}

/* Projects */
.projects{margin-top:1.25rem;display:flex;flex-direction:column;gap:1rem}
.project{display:flex;gap:1rem;align-items:flex-start;padding:.75rem;border-radius:12px;background:var(--card);box-shadow:var(--shadow);transition:transform .18s ease,box-shadow .18s ease;overflow:hidden;animation:fadeInUp .42s ease both;animation-delay:calc(var(--i,0) * .08s)}
.project a{display:flex;gap:1rem;align-items:flex-start;color:inherit;text-decoration:none;width:100%}
.project-thumb{width:320px;height:180px;border-radius:8px;object-fit:cover;background:#eef3f6;border:1px solid rgba(0,0,0,0.04);flex:0 0 320px;transition:transform .18s ease,box-shadow .18s ease}
.project-body{flex:1;min-width:0}
.project h2{margin:.25rem 0;font-size:1.125rem}
.project-desc{margin:0;color:var(--muted)}

.project:hover{transform:translateY(-6px);box-shadow:0 18px 40px rgba(2,6,23,0.10)}
.project:hover .project-thumb{transform:scale(1.03)}

/* Keyframes */
@keyframes fadeInUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

/* Responsive: smaller thumbs and stacked layout */
@media(max-width:1000px){
  .project-thumb{width:240px;height:135px;flex:0 0 240px}
}
@media(max-width:700px){
  /* Stack project card; ensure thumbnail doesn't push content off-screen */
  .project{flex-direction:column;align-items:flex-start;padding:.6rem;min-height:0}

  /* On narrow devices, make the project link a flex column so image sits above the description */
  .project a{display:flex;flex-direction:column;align-items:center}

  /* Render the thumbnail smaller (length/width) and centered so description is visible below */
  .project-thumb{width:80%;max-width:320px;height:auto;flex:0 0 auto;max-height:140px;object-fit:cover;display:block;margin:0 auto .6rem}

  .project-body{padding-top:0;display:block;color:var(--text);width:100%}

  /* Make cover image more compact on narrow screens */
  .cover img{max-height:140px;object-fit:cover;border-radius:8px}

  /* Also make the direct inner div inside .project stack on small screens */
  .project > div{display:flex;flex-direction:column;align-items:center}
}

/* Extra small screens */
@media(max-width:420px){
  .cover img{max-height:100px}
  .project-thumb{width:85%;max-width:260px;height:auto;max-height:120px}
  .project h2{font-size:1rem}
  /* On very narrow devices force the project content to stack and center text */
  .project a{align-items:center}
  .project-body{padding:.5rem 0;text-align:center}
}

footer.site-footer{max-width:1000px;margin:2rem auto 4rem auto;padding:0 1rem;color:var(--muted)}

/* Small screens layout for hero */
@media(min-width:700px){
  .site-bar{padding:0 1rem}
  main.hero{grid-template-columns:1fr 360px}
}

/* Sources dropdown */
.sources-toggle{border:0;background:transparent;color:var(--accent);cursor:pointer;padding:.2rem .4rem;border-radius:6px;font-weight:600}
.sources-list{margin-top:.6rem;padding-left:1.1rem}
.sources-list li{margin:.25rem 0}
.sources-list a{color:var(--accent);text-decoration:underline}
.sources-list[hidden]{display:none}

/* Asyl - summary and content styling */
.lede{font-weight:600;margin:0 0 .8rem;padding:0.2rem 0;color:var(--text);font-size:1.05rem;border-left:3px solid var(--accent);padding-left:.9rem}
.summary{background:linear-gradient(90deg, rgba(94,150,255,0.04), transparent);padding:.6rem;border-radius:8px;margin-bottom:1rem;color:var(--text)}
.asyl-content h3{margin-top:1rem}
.asyl-content p{margin:0.5rem 0 0.9rem 0;line-height:1.6}

/* EU-weit page content */
.euweit-content h3{margin-top:1rem}
.euweit-content p{margin:0.6rem 0 0.9rem 0;line-height:1.6}
.euweit-content p:first-of-type{font-weight:600;color:var(--text);margin-bottom:.8rem}

