/* ---------- Design-Tokens (wie fotos.tbloder.at) ---------- */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #eeece7;
  --text: #16171a;
  --text-2: #5d6068;
  --line: rgb(22 23 26 / 0.09);
  --accent: #b5762a;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 30px rgb(0 0 0 / 0.06);
  --shadow-hover: 0 2px 4px rgb(0 0 0 / 0.05), 0 18px 50px rgb(0 0 0 / 0.1);
  --radius: 18px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* Farben von ukrainian.tbloder.at */
  --uk-blue: #2f5f9e;
  --uk-gold: #ddb03a;
  --uk-bg: #f5f4ef;
  --uk-ink: #172030;
  color-scheme: light;
}
/* Dunkel nach System, außer es ist "hell" gewählt; oder ausdrücklich "dunkel" gewählt (data-theme auf <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c0f; --surface: #15171c; --surface-2: #1d2027; --text: #eceae6; --text-2: #9a9ca3;
    --line: rgb(255 255 255 / 0.08); --accent: #e8b86b;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 40px rgb(0 0 0 / 0.35);
    --shadow-hover: 0 2px 4px rgb(0 0 0 / 0.35), 0 18px 60px rgb(0 0 0 / 0.5);
    --uk-blue: #24497a; --uk-bg: #10151c; --uk-ink: #e6eaf0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c0f; --surface: #15171c; --surface-2: #1d2027; --text: #eceae6; --text-2: #9a9ca3;
  --line: rgb(255 255 255 / 0.08); --accent: #e8b86b;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 40px rgb(0 0 0 / 0.35);
  --shadow-hover: 0 2px 4px rgb(0 0 0 / 0.35), 0 18px 60px rgb(0 0 0 / 0.5);
  --uk-blue: #24497a; --uk-bg: #10151c; --uk-ink: #e6eaf0;
  color-scheme: dark;
}
/* Fraunces hat keine kyrillischen Zeichen */
:root:lang(uk) { --font-display: "Lora", Georgia, serif; }

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Leiste: Sprache und Darstellung ---------- */
.topbar {
  width: 100%; max-width: 1080px; margin: 0 auto; padding: 16px 20px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.tools { display: flex; align-items: center; gap: 12px; }
.langs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.flag, .theme-toggle {
  display: grid; place-items: center; padding: 0; border: 0; cursor: pointer; color: inherit; background: transparent;
  transition: background 0.2s, opacity 0.2s, transform 0.15s;
}
.flag { width: 36px; height: 30px; border-radius: 999px; opacity: 0.55; }
.flag svg {
  width: 24px; height: 16px; border-radius: 3px; display: block;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.12);
}
.flag:hover { opacity: 1; }
.flag[aria-pressed="true"] { opacity: 1; background: var(--surface-2); }
.flag:active, .theme-toggle:active { transform: scale(0.94); }
.theme-toggle { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle svg { width: 20px; height: 20px; fill: currentColor; display: none; }
:root:not([data-theme]) .theme-toggle .i-auto,
:root[data-theme="light"] .theme-toggle .i-light,
:root[data-theme="dark"] .theme-toggle .i-dark { display: block; }
/* Sehr schmale Handys: alles bleibt in einer Zeile */
@media (max-width: 359px) {
  .topbar, .tools { gap: 8px; }
  .eyebrow { letter-spacing: 0.06em; }
  .flag { width: 30px; }
}

/* ---------- Kopf ---------- */
.hero {
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: clamp(32px, 9vw, 88px) 20px clamp(32px, 6vw, 56px);
}
.eyebrow {
  margin: 0; color: var(--accent); font-weight: 600; font-size: 13px;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.hero h1 {
  margin: 0; font: 500 clamp(44px, 9vw, 84px)/1.02 var(--font-display); letter-spacing: -0.02em;
}
.lead { margin: 20px 0 0; max-width: 36em; color: var(--text-2); font-size: clamp(17px, 2.2vw, 19px); }

/* ---------- Projekte ---------- */
.projects {
  width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px;
}
.project {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.project:active { transform: translateY(-1px); }

.visual { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.body h2 { margin: 0 0 8px; font: 600 26px/1.2 var(--font-display); letter-spacing: -0.01em; }
.body p { margin: 0 0 12px; color: var(--text-2); }
.body .meta { font-size: 14px; }
.link {
  margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--accent);
}
.arrow { transition: transform 0.35s var(--ease); }
.project:hover .arrow { transform: translateX(4px); }

/* Fotos: Mosaik der neuesten Alben, sonst Kamera-Symbol */
.project-fotos .visual { background: linear-gradient(135deg, #1d2027, #0b0c0f); color: #e8b86b; }
.visual-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.visual-fallback svg { width: 112px; height: 112px; fill: currentColor; opacity: 0.9; }
.has-photos .visual-fallback { display: none; }
.mosaic { position: absolute; inset: 0; display: grid; gap: 3px; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.mosaic img:first-child { grid-row: 1 / -1; }
.mosaic[data-count="1"] { grid-template-columns: 1fr; }
.mosaic[data-count="2"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.mosaic[data-count="3"] { grid-template-rows: 1fr 1fr; }
.project-fotos:hover .mosaic img { transform: scale(1.03); }

/* Ukrainisch: Ї-Kachel und Kreuzstich-Borte */
.project-ukrainian .visual {
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--uk-bg); color: var(--uk-ink);
}
.project-ukrainian .visual::before {
  content: ""; height: 8px; flex: none;
  background: linear-gradient(var(--uk-blue) 50%, var(--uk-gold) 50%);
}
.stitch {
  height: 14px; margin: 10px 0; flex: none;
  background:
    radial-gradient(circle, var(--uk-gold) 0 2.5px, transparent 3px) 0 0 / 22px 14px,
    linear-gradient(45deg, transparent 45%, var(--uk-blue) 45% 55%, transparent 55%) 11px 2px / 10px 10px repeat-x,
    linear-gradient(-45deg, transparent 45%, var(--uk-blue) 45% 55%, transparent 55%) 11px 2px / 10px 10px repeat-x;
  background-repeat: repeat-x;
  background-size: 22px 14px, 22px 10px, 22px 10px;
}
.uk-mark { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 22px); padding: 0 20px; }
.uk-tile {
  display: grid; place-items: center; flex: none;
  width: clamp(64px, 14vw, 92px); aspect-ratio: 1; border-radius: 22%;
  background: var(--uk-blue); color: var(--uk-gold); box-shadow: inset 0 -6px 0 var(--uk-gold);
  font: 600 clamp(40px, 9vw, 58px)/1 "Fira Sans", var(--font);
}
.uk-word { font: 600 clamp(24px, 5vw, 36px)/1.1 "Fira Sans", var(--font); letter-spacing: -0.01em; }
.project-ukrainian:hover .uk-tile { transform: rotate(-4deg); }
.uk-tile { transition: transform 0.35s var(--ease); }

/* ---------- Fuß ---------- */
.footer {
  width: 100%; max-width: 1080px; margin: auto auto 0; padding: 56px 20px 32px;
  color: var(--text-2); font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
