/* =========================================================
   0) Theme Tokens (Light/Dark) + Base
   ========================================================= */

/* Default: Light */
:root{
  /* Colors */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --text: #111827;
  --muted: rgba(17,24,39,0.65);
  --border: rgba(17,24,39,0.12);

  --shadow: 0 10px 25px rgba(0,0,0,0.06);

  /* Accent */
  --accent: #2563eb; /* blau */
  --accent-2: #1d4ed8;

  /* Radius + Spacing */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;

  --s-1: 0.5rem;
  --s-2: 0.75rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2rem;
  --s-6: 3rem;

  /* Typography */
  --lh: 1.5;
  --max-prose: 100ch;

  color-scheme: light;
}

/* Dark Mode via data-attribute */
:root[data-theme="dark"]{
  --bg: #0b1020;
  --surface: #0f172a;
  --surface-2: #111c33;
  --text: #e5e7eb;
  --muted: rgba(229,231,235,0.70);
  --border: rgba(229,231,235,0.14);

  --shadow: 0 10px 25px rgba(0,0,0,0.35);

  --accent: #60a5fa;
  --accent-2: #3b82f6;

  color-scheme: dark;
}

html, body{
  background: var(--bg);
  color: var(--text);
}

/* Useful base defaults */
img{ max-width: 100%; height: auto; }
a{ color: var(--accent); }
a:hover{ color: var(--accent-2); }

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: none;
}

/* Optional: nicer card hover */
.card--hover:hover{
  box-shadow: var(--shadow);
  border-color: rgba(0,0,0,0.18);
}
:root[data-theme="dark"] .card--hover:hover{
  border-color: rgba(255,255,255,0.22);
}

.home-page main {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =========================================================
   1) Viewer
   ========================================================= */

.viewer-wrap{
  height: 60vh;
  min-height: 360px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

#viewer{
  width: 100%;
  height: 100%;
  display: block;
}

.progress{
  height: 8px;
}

/* =========================================================
   2) Home Intro
   ========================================================= */

.intro-section{
  display: flex;
  align-items: center;
  gap: var(--s-6);
  padding: 4rem 0;
}

.profile-image{
  max-width: 420px;
  width: 100%;
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
}

/* Mobile */
@media (max-width: 900px){
  .intro-section{
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-4);
  }
}

/* =========================================================
   3) Project List (Projects Overview)
   ========================================================= */

.project-list{
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

/* renamed from project-row (list) -> project-card */
.project-card{
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: var(--s-3);
  align-items: center;

  padding: var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.project-card:hover{
  box-shadow: var(--shadow);
}

/* renamed from project-thumb -> project-card__thumb */
.project-card__thumb img{
  width: 110px;
  height: 74px;
  object-fit: cover;
  border-radius: var(--r-sm);
  display: block;
}

.project-card__thumb--placeholder{
  width: 110px;
  height: 74px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 0.85rem;
  color: var(--muted);
}

.project-card__cta{
  white-space: nowrap;
}

@media (max-width: 768px){
  .project-card{
    grid-template-columns: 90px 1fr;
    grid-template-rows: auto auto;
  }
  .project-card__cta{
    grid-column: 2;
    justify-self: start;
  }
  .project-card__thumb img,
  .project-card__thumb--placeholder{
    width: 90px;
    height: 64px;
  }
}

/* =========================================================
   4) Prose (Markdown content)
   ========================================================= */

.prose{
  max-width: var(--max-prose);
  line-height: var(--lh);
  margin-left: auto;
  margin-right: auto;
}

.prose h2{
  margin-top: 2rem;
}

.prose img{
  width: 100%;
  border-radius: var(--r-md);
  margin: 1rem 0;
  border: 1px solid var(--border);
}

/* =========================================================
   5) Project Report Layout (Markdown inside HTML blocks)
   ========================================================= */

.project-hero{
  max-width: 900px;
  margin: 2rem auto;
  background: var(--surface-2);
  padding: 1rem;
  border-radius: var(--r-md);
}

.project-hero img,
.project-hero video{
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: var(--r-md);
}

.project-hero img{
  box-shadow: var(--shadow);
}

.report-row{
  display: flex;
  gap: var(--s-5);
  align-items: center;
  margin: 2.5rem 0;
}

.report-row--reverse{
  flex-direction: row-reverse;
}

.report-img{
  flex: 1;
}

.report-img img{
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

.report-text{
  flex: 2;
  line-height: var(--lh);
  color: var(--text);
}

@media (max-width: 900px){
  .report-row,
  .report-row--reverse{
    flex-direction: column;
    align-items: stretch;
  }
}

/* =========================================================
   6) YouTube Videos
   ========================================================= */
.yt-consent {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.yt-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.yt-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06); /* optional: etwas reinzoomen */
}

.yt-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    rgba(0, 0, 0, 0.08),
    rgba(0, 0, 0, 0.2)
  );
}

.yt-play-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 1;
  font-size: 84px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.yt-play-btn:hover {
  color: white;
  transform: scale(1.05);
}

.yt-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}