/* ============================================================
   johmarjac.me — Stylesheet
   Keine Abhängigkeiten, keine Build-Tools. Farben unten anpassen.
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg:        #0b0f14;
  --bg-alt:    #0e141b;
  --surface:   #121a23;
  --surface-2: #17212c;
  --border:    #1e2a37;
  --border-hi: #2a3a4c;

  --text:      #e6edf3;
  --text-mid:  #9fb0c0;
  --text-dim:  #6b7f92;

  --accent:      #4cc2ff;
  --accent-soft: rgba(76, 194, 255, .12);
  --accent-ring: rgba(76, 194, 255, .35);
  --accent-2:    #7c8cff;

  --radius:    14px;
  --radius-sm: 9px;
  --wrap:      1080px;

  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.55);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

html[data-theme="light"] {
  --bg:        #ffffff;
  --bg-alt:    #f6f8fa;
  --surface:   #ffffff;
  --surface-2: #f2f5f8;
  --border:    #e3e8ee;
  --border-hi: #cfd8e2;

  --text:      #0f1b26;
  --text-mid:  #4a5b6b;
  --text-dim:  #6b7d8e;

  --accent:      #0969da;
  --accent-soft: rgba(9, 105, 218, .09);
  --accent-ring: rgba(9, 105, 218, .28);
  --accent-2:    #5b5bd6;

  --shadow: 0 1px 2px rgba(15,27,38,.05), 0 10px 30px -14px rgba(15,27,38,.22);
}

/* ── Reset / Basis ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}

h1, h2, h3 { line-height: 1.18; letter-spacing: -.02em; margin: 0; font-weight: 650; }
p { margin: 0 0 1.05em; }
a { color: inherit; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
svg { display: block; }
[hidden] { display: none !important; }

.icon {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.icon-inline { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  z-index: 200;
  background: var(--accent); color: #001018;
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--border); }

.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: 66px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600;
  letter-spacing: -.01em;
  margin-right: auto;
}
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121c;
  font: 700 12px/1 var(--mono);
  letter-spacing: .02em;
}
html[data-theme="light"] .brand-mark { color: #fff; }
.brand-name { font-family: var(--mono); font-size: 14.5px; color: var(--text); }

.nav { display: flex; gap: 4px; }
.nav a {
  position: relative;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--text-mid);
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.is-active { color: var(--accent); }

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

.icon-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-mid);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-hi); background: var(--surface-2); }

.lang-btn {
  width: auto; padding-inline: 11px;
  font: 600 12px/1 var(--mono);
  letter-spacing: .04em;
}

.icon-moon { display: none; }
html[data-theme="light"] .icon-sun  { display: none; }
html[data-theme="light"] .icon-moon { display: block; }

.menu-btn { display: none; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }

.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 340px at 12% -10%, var(--accent-soft), transparent 70%),
    radial-gradient(520px 300px at 92% 8%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 70%);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .30;
  mask-image: radial-gradient(720px 380px at 30% 0%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(720px 380px at 30% 0%, #000 10%, transparent 78%);
}

.hero-inner {
  position: relative;
  padding-block: clamp(72px, 13vw, 132px) clamp(64px, 10vw, 104px);
  max-width: 820px;
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 22px;
  padding: 5px 13px 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: 500 12.5px/1.5 var(--mono);
  color: var(--text-mid);
  letter-spacing: .01em;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero-title {
  font-size: clamp(2.6rem, 7.2vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -.035em;
  margin-bottom: 20px;
  background: linear-gradient(170deg, var(--text) 30%, var(--text-mid));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 620;
  letter-spacing: -.025em;
  line-height: 1.25;
  margin: -6px 0 18px;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: clamp(1.02rem, 2.1vw, 1.2rem);
  color: var(--text-mid);
  max-width: 60ch;
  margin-bottom: 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 52px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background-color .2s ease,
              border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #04121c;
  box-shadow: 0 6px 20px -8px var(--accent-ring);
}
html[data-theme="light"] .btn-primary { color: #fff; }
.btn-primary:hover { box-shadow: 0 10px 26px -8px var(--accent-ring); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--border-hi); background: var(--surface-2); }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 14px 44px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.hero-meta li { display: flex; flex-direction: column; gap: 3px; }
.meta-k {
  font: 500 11px/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-dim);
}
.meta-v { font-size: 14.5px; font-weight: 550; color: var(--text); }

/* ── Sections ──────────────────────────────────────────────── */
.section { padding-block: clamp(64px, 9vw, 100px); }
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 14px;
}
.section-num {
  font: 500 12.5px/1 var(--mono);
  color: var(--accent);
  letter-spacing: .08em;
}
.section-head h2 { font-size: clamp(1.55rem, 3.4vw, 2.05rem); }

.section-lead {
  color: var(--text-mid);
  max-width: 62ch;
  margin-bottom: 38px;
}

/* ── Über mich ─────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr);
  gap: 40px;
  margin-top: 28px;
}
.about-text p { color: var(--text-mid); max-width: 62ch; }
.about-text p:last-child { margin-bottom: 0; }

.about-facts {
  align-self: start;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.about-facts dl { display: grid; gap: 16px; }
.about-facts dt {
  font: 500 11px/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.about-facts dd { font-size: 14.5px; font-weight: 550; }

/* ── Cards ─────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 18px;
}

.card {
  position: relative;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.card:hover {
  border-color: var(--border-hi);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 15.5px; font-weight: 620;
  margin-bottom: 14px;
}
.card-title .icon { width: 17px; height: 17px; color: var(--accent); flex: none; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font: 500 12.5px/1.5 var(--mono);
  color: var(--text-mid);
  white-space: nowrap;
}

/* ── Schwerpunkte ──────────────────────────────────────────── */
.focus-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }

.card-text {
  font-size: 14.5px;
  color: var(--text-mid);
  margin: 0;
}

/* ── Tech-Stack ────────────────────────────────────────────── */
.stack {
  border-top: 1px solid var(--border);
}
.stack-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px 28px;
  align-items: baseline;
  padding: 18px 2px;
  border-bottom: 1px solid var(--border);
}
.stack-label {
  margin: 0;
  font: 500 11.5px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-dim);
}

/* ── Nexus (Feature-Block) ─────────────────────────────────── */
.feature {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 64px;
}
.feature::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
}

.badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 11px;
  border: 1px solid var(--accent-ring);
  border-radius: 999px;
  background: var(--accent-soft);
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.feature-title {
  font-size: clamp(1.5rem, 3.2vw, 1.95rem);
  letter-spacing: -.03em;
  margin: 0 0 16px;
}
.feature-lead {
  font-size: clamp(.98rem, 1.9vw, 1.06rem);
  color: var(--text-mid);
  max-width: 68ch;
  margin-bottom: 30px;
}

/* Datenfluss */
.flow-wrap {
  margin: 0 -4px 30px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.flow {
  display: flex; align-items: center;
  gap: 10px;
  min-width: max-content;
}
.flow-step {
  display: inline-flex; align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-alt);
  font: 500 12.5px/1.5 var(--mono);
  color: var(--text-mid);
  white-space: nowrap;
}
.flow-step.is-core {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}
.flow-step:not(:last-child)::after {
  content: "";
  width: 16px; height: 8px;
  margin: 0 -6px 0 12px;
  flex: none;
  background: currentColor;
  color: var(--text-dim);
  -webkit-mask: no-repeat center/16px 8px url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 8'%3E%3Cpath d='M0 4h13M10 1l3 3-3 3' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
          mask: no-repeat center/16px 8px url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 8'%3E%3Cpath d='M0 4h13M10 1l3 3-3 3' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Aufgabenliste */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 9px 24px;
  margin-bottom: 26px;
}
.feature-list li {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 14.5px;
  color: var(--text-mid);
}
.icon-check {
  width: 15px; height: 15px;
  margin-top: 4px;
  flex: none;
  color: var(--accent);
  stroke-width: 2.4;
}

.feature-note {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 15px 17px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-mid);
  margin: 0;
}
.feature-note .icon { color: var(--accent); margin-top: 3px; flex: none; }

/* Unterüberschrift innerhalb einer Section */
.subhead {
  font-size: 1.12rem;
  margin-bottom: 6px;
}
.subhead-lead {
  color: var(--text-mid);
  font-size: 14.5px;
  margin-bottom: 26px;
}

/* ── Projekte ──────────────────────────────────────────────── */
.projects .card { display: flex; flex-direction: column; }

.project-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.project-name {
  font-size: 15.5px; font-weight: 620;
  letter-spacing: -.01em;
  text-decoration: none;
}
.project-name::after { content: ""; position: absolute; inset: 0; } /* ganze Karte klickbar */
.card:hover .project-name { color: var(--accent); }
.project-arrow { color: var(--text-dim); flex: none; transition: color .2s ease, transform .2s ease; }
.card:hover .project-arrow { color: var(--accent); transform: translate(2px, -2px); }

.project-desc {
  font-size: 14.5px;
  color: var(--text-mid);
  margin-bottom: 18px;
  flex: 1;
}

.project-stack { display: flex; flex-wrap: wrap; gap: 7px; }
.stack-item {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 12px/1.5 var(--mono);
  color: var(--text-dim);
}
.stack-item::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--dot, var(--accent)); flex: none;
}

.more-link { margin: 34px 0 0; }
.more-link a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 550;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.more-link a:hover { border-bottom-color: var(--accent); }

/* ── Kontakt ───────────────────────────────────────────────── */
.contact-box {
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.contact-lead {
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: var(--text-mid);
  max-width: 56ch;
  margin-bottom: 28px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 340px));
  justify-content: start;
  gap: 12px;
}
.contact-link {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}
.contact-link:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.contact-link .icon { color: var(--accent); flex: none; }
.contact-link span { display: flex; flex-direction: column; min-width: 0; }
.contact-link strong { font-size: 14.5px; font-weight: 600; }
.contact-link em {
  font: 400 13px/1.5 var(--mono);
  font-style: normal;
  color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 30px;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  align-items: center; justify-content: space-between;
  font-size: 13.5px; color: var(--text-dim);
}
.site-footer p { margin: 0; }
.footer-note { font-family: var(--mono); font-size: 12.5px; }

/* ── Scroll-Reveal ─────────────────────────────────────────── */
/* Nur wenn JS aktiv ist — ohne JS bleibt alles sichtbar. */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s cubic-bezier(.22,.61,.36,1),
              transform .6s cubic-bezier(.22,.61,.36,1);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 860px) {
  .stack-row { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 900px) {
  .menu-btn { display: grid; }

  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px;
    padding: 10px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 12px; font-size: 15.5px; }

  .hero-meta { gap: 16px 32px; }
  .wrap { padding-inline: 20px; }
}

/* ── Reduced Motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── Print ─────────────────────────────────────────────────── */
@media print {
  .site-header, .hero-bg, .hero-actions, .menu-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}
