/* ============================================================
   dzeksn.com — Terminal-Design
   Phosphor-Grün auf CRT-Schwarz. Komplett eigenständiges Design.
   ============================================================ */

:root {
  --bg: #050a06;
  --bg2: #0a120c;
  --surface: #0c1510;
  --line: #17331f;
  --line-bright: #1f4a2c;
  --green: #3bf47f;
  --green-soft: #2ecc70;
  --green-dim: #1e8a4c;
  --text: #b9dcc3;
  --muted: #6a9377;
  --amber: #ffb454;
  --blue: #6cb6ff;
  --red: #ff5f56;
  --glow: rgba(59, 244, 127, 0.14);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --bar-h: 38px;
  --max: 960px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

::selection { background: var(--green); color: #04120a; }

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -48px; left: 12px; z-index: 300;
  background: var(--green); color: #04120a;
  padding: 8px 14px; font-weight: 700;
  transition: top .2s;
}
.skip-link:focus { top: 46px; text-decoration: none; }

/* ---------- CRT-Atmosphäre ---------- */
.crt {
  position: fixed; inset: 0; z-index: 90;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.22) 0px, rgba(0, 0, 0, 0.22) 1px,
      transparent 1px, transparent 3px),
    radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.42) 100%);
  opacity: .5;
}

/* ---------- tmux-Statusleiste (Navigation) ---------- */
.tmux {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--bar-h);
  background: var(--green);
  color: #04120a;
  display: flex; align-items: stretch; gap: 0;
  font-size: 13px; font-weight: 600;
  transition: transform .3s ease;
  overflow-x: auto;
  scrollbar-width: none;
}
.tmux::-webkit-scrollbar { display: none; }
.tmux--hidden { transform: translateY(-100%); }

.tmux__session {
  display: flex; align-items: center;
  padding: 0 14px;
  background: #04120a; color: var(--green);
  font-weight: 700; white-space: nowrap;
}
.tmux__tabs { display: flex; align-items: stretch; flex: 1; }
.tmux__tab {
  display: flex; align-items: center;
  padding: 0 13px;
  color: #073d1f;
  white-space: nowrap;
}
.tmux__tab:hover { background: rgba(4, 18, 10, 0.16); text-decoration: none; color: #04120a; }
.tmux__tab[aria-current="page"] {
  background: #04120a; color: var(--green);
}
.tmux__tab[aria-current="page"]::after { content: "*"; margin-left: 2px; }
.tmux__meta {
  display: flex; align-items: center;
  padding: 0 14px; white-space: nowrap;
  color: #073d1f;
}
@media (max-width: 640px) { .tmux__meta { display: none; } }

/* ---------- Layout ---------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--bar-h) + 40px) 20px 60px;
  position: relative; z-index: 10;
}

.section { margin: 64px 0; }
.section:first-child { margin-top: 0; }

/* Prompt-Zeile: arijan@dzeksn:~$ befehl */
.prompt {
  display: block;
  font-size: 15px;
  margin-bottom: 18px;
  word-break: break-word;
}
.prompt .u { color: var(--green); font-weight: 700; }
.prompt .p { color: var(--blue); }
.prompt .d { color: var(--muted); }
.prompt .c { color: var(--text); font-weight: 600; }
.prompt .a { color: var(--amber); }

h2.prompt, .prompt h2 { font-size: 15px; font-weight: 400; display: inline; }

.output { padding-left: 0; }

/* ---------- Hero ---------- */
.hero { margin-top: 8px; }
.hero__boot { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.hero__boot .ok { color: var(--green); font-weight: 700; }

.banner {
  font-size: clamp(5.4px, 1.55vw, 14px);
  line-height: 1.18;
  color: var(--green);
  text-shadow: 0 0 18px var(--glow), 0 0 3px rgba(59, 244, 127, 0.45);
  white-space: pre;
  overflow: hidden;
  margin: 18px 0 20px;
}

.hero__role {
  color: var(--text);
  font-size: clamp(15px, 2.4vw, 19px);
  font-weight: 700;
  margin-bottom: 6px;
}
.hero__role .sep { color: var(--green-dim); }
.hero__sub { color: var(--muted); margin-bottom: 28px; }
.hero__sub .flag { color: var(--amber); }

.cursor {
  display: inline-block;
  width: .62em; height: 1.15em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1.06s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Terminal-Buttons ---------- */
.btnrow { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 8px; }
.tbtn {
  display: inline-block;
  border: 1px solid var(--green-dim);
  background: rgba(59, 244, 127, 0.05);
  color: var(--green);
  font-family: var(--mono);
  font-size: 14px; font-weight: 700;
  padding: 11px 20px;
  cursor: pointer;
  transition: background .18s, box-shadow .18s, transform .18s;
}
.tbtn::before { content: "$ "; color: var(--muted); font-weight: 400; }
.tbtn:hover {
  background: rgba(59, 244, 127, 0.12);
  box-shadow: 0 0 22px var(--glow);
  text-decoration: none;
  transform: translateY(-1px);
}
.tbtn--amber { color: var(--amber); border-color: rgba(255, 180, 84, 0.4); background: rgba(255, 180, 84, 0.05); }
.tbtn--amber:hover { background: rgba(255, 180, 84, 0.12); box-shadow: 0 0 22px rgba(255, 180, 84, 0.12); }

/* ---------- Interaktive Shell ---------- */
.shell {
  border: 1px solid var(--line-bright);
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 244, 127, 0.05);
}
.shell__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.shell__dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.shell__dot--r { background: var(--red); }
.shell__dot--y { background: var(--amber); }
.shell__dot--g { background: var(--green-soft); }
.shell__title { margin-left: 8px; }
.shell__body {
  padding: 16px;
  min-height: 200px; max-height: 420px;
  overflow-y: auto;
  font-size: 14px;
  cursor: text;
}
.shell__body .ln { white-space: pre-wrap; word-break: break-word; }
.shell__body .ln--muted { color: var(--muted); }
.shell__body .ln--green { color: var(--green); }
.shell__body .ln--amber { color: var(--amber); }
.shell__body .ln--red { color: var(--red); }
.shell__body .ln--blue { color: var(--blue); }
.shell__input-line { display: flex; align-items: baseline; gap: 0; }
.shell__input {
  flex: 1;
  background: transparent; border: 0;
  color: var(--text);
  font-family: var(--mono); font-size: 14px;
  caret-color: var(--green);
  padding-left: 8px;
}
.shell__input:focus { outline: none; }
.shell__hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.shell__hint code { color: var(--green); }

/* ---------- ls-Ausgabe (Leistungen) ---------- */
.ls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 4px; }
.ls__item {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 18px;
  transition: border-color .2s, box-shadow .2s;
}
.ls__item:hover { border-color: var(--green-dim); box-shadow: 0 0 24px rgba(59, 244, 127, 0.06); }
.ls__name { color: var(--green); font-weight: 700; margin-bottom: 6px; }
.ls__name::before { content: "drwxr-xr-x  "; color: var(--muted); font-weight: 400; font-size: 12px; }
.ls__desc { color: var(--text); font-size: 14px; }
@media (max-width: 680px) { .ls { grid-template-columns: 1fr; } }

/* ---------- Skill-Balken ---------- */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 40px; }
.skill { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.skill__name { width: 120px; flex: none; color: var(--text); }
.skill__bar { color: var(--green); letter-spacing: 1px; text-shadow: 0 0 10px var(--glow); }
.skill__bar .off { color: var(--line-bright); text-shadow: none; }
@media (max-width: 680px) { .skills { grid-template-columns: 1fr; } }
.skills-note { margin-top: 16px; color: var(--muted); font-size: 13px; }

/* ---------- git-log-Timeline (Werdegang) ---------- */
.gitlog { position: relative; padding-left: 26px; }
.gitlog::before {
  content: "";
  position: absolute; left: 7px; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--green), var(--line-bright));
}
.commit { position: relative; padding: 0 0 34px; }
.commit:last-child { padding-bottom: 0; }
.commit::before {
  content: "";
  position: absolute; left: -25px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--green);
  box-shadow: 0 0 12px var(--glow);
}
.commit--head::before { background: var(--green); }
.commit__hash { color: var(--amber); font-size: 13px; }
.commit__ref { color: var(--red); font-size: 13px; }
.commit__ref--head { color: var(--blue); }
.commit__date { color: var(--muted); font-size: 13px; }
.commit__title { color: var(--green); font-weight: 700; font-size: 16px; margin: 4px 0 2px; }
.commit__org { color: var(--text); font-size: 14px; margin-bottom: 8px; }
.commit ul { list-style: none; margin-top: 6px; }
.commit ul li { padding-left: 18px; position: relative; font-size: 14px; color: var(--text); margin-bottom: 3px; }
.commit ul li::before { content: "+"; position: absolute; left: 0; color: var(--green-dim); }
.commit__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.tag {
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 9px;
}

/* ---------- Projekt-Cards (Terminal-Fenster mit Screenshot) ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 760px) { .projects { grid-template-columns: 1fr; } }

.proj {
  border: 1px solid var(--line-bright);
  background: var(--surface);
  display: flex; flex-direction: column;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.proj:hover {
  transform: translateY(-4px);
  border-color: var(--green-dim);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 34px rgba(59, 244, 127, 0.08);
}
.proj__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.proj__bar .shell__dot { width: 9px; height: 9px; }
.proj__url { margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj__shot { display: block; position: relative; overflow: hidden; aspect-ratio: 8 / 5; background: var(--bg2); }
.proj__shot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(.92);
  transition: transform .35s ease, filter .35s ease;
}
.proj:hover .proj__shot img { transform: scale(1.035); filter: saturate(1.05); }
.proj__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.proj__name { color: var(--green); font-size: 16px; font-weight: 700; }
.proj__desc { color: var(--text); font-size: 13.5px; flex: 1; }
.proj__meta { display: flex; flex-wrap: wrap; gap: 7px; }
.proj__link { font-size: 13.5px; font-weight: 700; }
.proj__link::before { content: "→ "; }

/* ---------- Kontakt / man-page ---------- */
.man { border: 1px solid var(--line); background: var(--surface); padding: 26px; }
.man__h { color: var(--green); font-weight: 700; margin: 18px 0 6px; letter-spacing: 1px; }
.man__h:first-child { margin-top: 0; }
.man p, .man dd { margin-bottom: 6px; }
.man dl { display: grid; grid-template-columns: 170px 1fr; gap: 6px 16px; }
.man dt { color: var(--amber); }
@media (max-width: 560px) { .man dl { grid-template-columns: 1fr; } .man dt { margin-top: 8px; } }

/* ---------- Kommentar-/Info-Blöcke ---------- */
.comment { color: var(--muted); }
.comment::before { content: "# "; color: var(--green-dim); }

.callout {
  border-left: 3px solid var(--green);
  background: rgba(59, 244, 127, 0.045);
  padding: 16px 20px;
  margin: 24px 0;
}

/* ---------- Footer als Statuszeile ---------- */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  position: relative; z-index: 10;
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 20px 30px;
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  justify-content: space-between;
  font-size: 13px; color: var(--muted);
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--green); }
.footer .mode { color: var(--green-dim); }

/* ---------- Buchstaben-Transition ---------- */
.fx-char {
  display: inline-block;
  will-change: transform, opacity;
}
.fx-out .fx-char {
  animation: charFall .5s cubic-bezier(.5, .05, .8, .5) forwards;
  animation-delay: var(--fxd, 0s);
}
@keyframes charFall {
  0%   { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(var(--fxy, 90px)) rotate(var(--fxr, 20deg)); opacity: 0; }
}
.fx-in .fx-char {
  opacity: 0;
  animation: charRise .45s cubic-bezier(.2, .7, .3, 1.05) forwards;
  animation-delay: var(--fxd, 0s);
}
@keyframes charRise {
  0%   { transform: translateY(var(--fxy, -60px)) rotate(var(--fxr, -14deg)); opacity: 0; }
  100% { transform: translateY(0) rotate(0); opacity: 1; }
}
.page-veil {
  position: fixed; inset: 0; z-index: 250;
  background: var(--bg);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.fx-out .page-veil { opacity: 1; transition-delay: .28s; }

/* ---------- Scroll-Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.vis { opacity: 1; transform: none; }

/* ---------- Legal-Seiten ---------- */
.legal h1 { color: var(--green); font-size: 22px; margin-bottom: 20px; }
.legal h2 { color: var(--green); font-size: 16px; margin: 26px 0 8px; }
.legal p, .legal li { font-size: 14px; margin-bottom: 8px; }
.legal ul { padding-left: 20px; }

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

@media (max-width: 560px) {
  body { font-size: 14px; }
  main { padding-top: calc(var(--bar-h) + 26px); }
  .section { margin: 48px 0; }
}
