/* core/base.css
   Basis-Styles + Komponenten.
   Das konkrete Erscheinungsbild kommt aus themes/<name>/theme.css (CSS-Variablen + Overrides).
*/

:root {
  /* Fallbacks, falls kein Theme geladen wird */
  --bg: #ffffff;
  --card: #ffffff;

  --text: #111111;
  --muted: #555555;

  --border: #e5e5e5;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.06);

  --accent: #333333;
  --accent-hover: #111111;
  --accent-soft: rgba(0, 0, 0, 0.08);

  --radius: 16px;
  --container: 980px;

  /* Verlauf oben links */
  --grad-0: rgba(0, 0, 0, 0.14);
  --grad-1: rgba(0, 0, 0, 0.06);
  --grad-2: rgba(255, 255, 255, 0);
}

[data-theme="dark"] {
  --bg: #0b0c10;
  --card: #111317;

  --text: #e9e9ea;
  --muted: #b4b6bb;

  --border: #22252b;
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.45);

  --accent: #f2f2f2;
  --accent-hover: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.12);

  --grad-0: rgba(255, 255, 255, 0.10);
  --grad-1: rgba(255, 255, 255, 0.05);
  --grad-2: rgba(11, 12, 16, 0);
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #0b0c10;
    --card: #111317;

    --text: #e9e9ea;
    --muted: #b4b6bb;

    --border: #22252b;
    --shadow: 0 14px 32px rgba(0, 0, 0, 0.45);

    --accent: #f2f2f2;
    --accent-hover: #ffffff;
    --accent-soft: rgba(255, 255, 255, 0.12);

    --grad-0: rgba(255, 255, 255, 0.10);
    --grad-1: rgba(255, 255, 255, 0.05);
    --grad-2: rgba(11, 12, 16, 0);
  }
}

/* assets/css/style.css */

/* ===== Reset / Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
  line-height: 1.55;

  /* Verlauf oben links: stärker als vorher */
  background:
    radial-gradient(760px circle at 0% 0%,
      var(--grad-0) 0%,
      var(--grad-1) 22%,
      var(--grad-2) 65%
    ),
    var(--bg);

  color: var(--text);
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

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

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 65%, white);
  outline-offset: 2px;
}

/* ===== Theme variables (default = light) ===== */
/* ===== Dark variables (manual) ===== */
html/* ===== Auto mode: follow system ===== */
}

/* ===== Background adapts in dark ===== */
html[data-theme="dark"] body {
  background:
    radial-gradient(760px circle at 0% 0%,
      rgba(255, 45, 58, 0.34) 0%,
      rgba(255, 45, 58, 0.18) 24%,
      rgba(11, 12, 16, 0) 66%
    ),
    var(--bg);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] body {
    background:
      radial-gradient(760px circle at 0% 0%,
        rgba(255, 45, 58, 0.34) 0%,
        rgba(255, 45, 58, 0.18) 24%,
        rgba(11, 12, 16, 0) 66%
      ),
      var(--bg);
  }
}

/* ===== Layout ===== */
.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 40px 0;
}

.hero {
  padding: 54px 0 30px;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .site-header {
  background: rgba(11, 12, 16, 0.72);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .site-header {
    background: rgba(11, 12, 16, 0.72);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--text);
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
}

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

/* ===== Theme toggle button ===== */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow);
  cursor: pointer;
  padding: 0;
}

.icon-button:hover {
  background: var(--accent-soft);
}

.icon-button:active {
  transform: translateY(1px);
}

.icon-button .icon {
  font-size: 18px;
  line-height: 1;
}

/* ===== Typography ===== */
.kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1, h2, h3 {
  margin: 0 0 10px;
  line-height: 1.2;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 16px;
}

.lead {
  margin: 10px 0 0;
  font-size: 16px;
  color: var(--muted);
  max-width: 70ch;
}

.muted {
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

/* ===== Cards ===== */
.cards {
  margin-top: 22px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px;
}

.card p {
  margin: 8px 0 0;
  color: var(--muted);
}

/* ===== Projects grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.grid > .card,
.grid > article.card {
  grid-column: span 12;
}

@media (min-width: 760px) {
  .grid > .card,
  .grid > article.card {
    grid-column: span 4;
  }
}

/* ===== Buttons ===== */
.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(193, 18, 31, 0.20);
}

html[data-theme="dark"] .button {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .button {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  }
}

.button:hover {
  background: var(--accent-hover);
  color: #ffffff;
  text-decoration: none;
}

.button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}

.button.ghost:hover {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
  text-decoration: none;
}

/* ===== Hero with photo ===== */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.hero-text {
  min-width: 0;
}

.hero-photo {
  justify-self: center;
  width: min(340px, 100%);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  object-fit: cover;
  background: var(--card);
}

@media (min-width: 900px) {
  .hero-layout {
    grid-template-columns: 1.35fr 0.65fr;
    gap: 22px;
    align-items: start;
  }

  .hero-photo {
    justify-self: end;
    width: min(360px, 100%);
    position: sticky;
    top: 88px;
  }
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .site-footer {
  background: rgba(11, 12, 16, 0.72);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .site-footer {
    background: rgba(11, 12, 16, 0.72);
  }
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--muted);
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ===== Lists ===== */
ul {
  padding-left: 18px;
}

li {
  margin: 6px 0;
}

/* ===== Reduce motion ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
