@font-face {
    font-family: "Great Vibes";
    src: url("?api=font&f=great-vibes-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg:        #0f0c15;   /* tiefes Violett-Schwarz */
    --surface:   #171221;   /* Karten / Formular */
    --surface-2: #1f1830;   /* Hover-Zustand */
    --line:      #2c2340;   /* Rahmen */
    --text:      #eae5f2;   /* Fließtext */
    --muted:     #9a8fb5;   /* Nebentext */
    --accent:    #a970ff;   /* Lila-Akzent */
    --accent-2:  #7b3ff2;   /* dunkleres Lila für Verläufe */
    --danger:    #c0504d;   /* Fehler / Warnungen */
    --font-display: "Great Vibes", "Segoe Script", "Brush Script MT", cursive;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.65;
    /* dezenter violetter Schein oben, sonst ruhig */
    background-image: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(123, 63, 242, 0.18), transparent 70%);
    background-repeat: no-repeat;
}

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

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---------- Hero ---------- */
header {
    text-align: center;
    padding: 6rem 0 4rem;
}

h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3.2rem, 10vw, 5.5rem);
    line-height: 1.15;
    color: var(--text);
}

/* Signatur-Element: handgezogener Tintenstrich unter dem Namen */
.stroke {
    display: block;
    width: min(580px, 100%);
    margin: 0.25rem auto 1.5rem;
}
.stroke path {
    stroke: url(#strokeGrad);
    stroke-width: 4;
    stroke-linecap: round;
    fill: none;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: draw 1.4s ease-out 0.3s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
    .stroke path { stroke-dashoffset: 0; }
}

.tagline {
    color: var(--muted);
    font-size: 1.1rem;
}

nav {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.95rem;
}
nav a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}
nav a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Abschnitte ---------- */
section { padding: 1.5rem 0; }

h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.2rem, 6vw, 3rem);
    color: var(--accent);
    margin-bottom: 1.75rem;
}

/* ---------- Projekte ---------- */
.projects {
    display: grid;
    gap: 1rem;
}
.project {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}
.project::after {
  content: "";
  position: absolute;
  right: 0px; /* -8px */
  bottom: 0px; /* -12px */
  width: 130px;
  height: 120px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130 120" fill="%23a970ff"><g transform="translate(88,80)"><ellipse cy="-11" rx="5" ry="9"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(72)"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(144)"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(216)"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(288)"/><circle r="4" fill="%237b3ff2"/></g><g transform="translate(38,102) scale(0.65)"><ellipse cy="-11" rx="5" ry="9"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(72)"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(144)"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(216)"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(288)"/><circle r="4" fill="%237b3ff2"/></g><g transform="translate(112,26) scale(0.5)"><ellipse cy="-11" rx="5" ry="9"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(72)"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(144)"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(216)"/><ellipse cy="-11" rx="5" ry="9" transform="rotate(288)"/><circle r="4" fill="%237b3ff2"/></g></svg>') no-repeat center / contain;
  opacity: 0.14;
  transition: opacity 0.2s;
  pointer-events: none;
}
.project:hover::after { opacity: 0.3; }
.project:hover {
    background: var(--surface-2);
    border-color: var(--accent);
    transform: translateX(4px);
}
.project strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}
.project span { color: var(--muted); font-size: 0.92rem; }
.project .url { color: var(--accent); font-size: 0.85rem; display: block; margin-top: 0.4rem; }

/* ---------- Formular ---------- */
form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.75rem;
    display: grid;
    gap: 1.1rem;
}
label {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}
input, textarea, select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    padding: 0.7rem 0.9rem;
    transition: border-color 0.2s;
}
/* outline nur unterdrücken, wenn kein Tastatur-Fokus vorliegt –
   sonst würde die :focus-visible-Regel oben ausgehebelt */
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) { outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { min-height: 160px; resize: vertical; }

/* Honeypot – für Menschen unsichtbar */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button {
    justify-self: start;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #fff;
    border: none;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s;
}
button:hover { filter: brightness(1.15); }
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.55; cursor: wait; filter: none; transform: none; }

.form-status {
    display: none;
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}
.form-status.ok {
    display: block;
    background: rgba(123, 63, 242, 0.15);
    border: 1px solid var(--accent);
    color: var(--text);
}
.form-status.err {
    display: block;
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid var(--danger);
    color: var(--text);
}

/* ---------- Signal-Empfehlung ---------- */
.signal {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    padding: 1.1rem 1.4rem;
}
.signal svg { flex-shrink: 0; }
.signal p { font-size: 0.95rem; color: var(--muted); }
.signal p strong { color: var(--text); }

/* ---------- Footer ---------- */
footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--line);
    margin-top: 2rem;
}
footer a { color: var(--muted); }

@media (max-width: 480px) {
    header { padding: 4rem 0 3rem; }
    nav { gap: 1.25rem; flex-wrap: wrap; }
    form { padding: 1.25rem; }
}

/* ---------- Utilities (gemeinsam) ---------- */
.hidden { display: none !important; }

/* =========================================================================
   GLUT – verschlüsselte Notizen & Dateien
   Alle Regeln sind über body.glut gescopt und beeinflussen die
   Portfolio-Seiten nicht.
   ========================================================================= */

/* ---------- Kopf ---------- */
.glut header {
    text-align: left;
    padding: 2.75rem 0 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 1.1rem;
    flex-wrap: wrap;
}
.glut .wordmark {
    font-family: var(--font-display);
    font-size: 2.8rem;
    line-height: 1;
    color: var(--accent);
    text-decoration: none;
}
.glut .tagline { font-size: 0.95rem; }

.glut main { min-height: 60vh; }

/* ---------- Karten ---------- */
.glut section { padding: 0; }
.glut .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.1rem;
}
.glut .card.dragover { border-color: var(--accent); background: var(--surface-2); }
.glut .card h2 {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.9rem;
}
.glut p { margin-bottom: 0.75rem; }
.glut .muted { color: var(--muted); font-size: 0.9rem; }
.glut .small { font-size: 0.85rem; }

/* ---------- Eingabe ---------- */
.glut textarea {
    min-height: 200px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
}
.glut textarea::placeholder { color: var(--muted); opacity: 0.7; }

.glut .options {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin: 1rem 0 1.15rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.glut .options label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.9rem;
    cursor: pointer;
}
.glut .options select {
    width: auto;
    background: var(--surface-2);
    padding: 0.4rem 0.65rem;
    font-size: 0.9rem;
    cursor: pointer;
}

/* ---------- Datei-Anhang ---------- */
.glut .filerow {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.glut .filechip {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.35rem 0.5rem 0.35rem 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    max-width: 100%;
}
.glut .filechip .fname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
}
.glut .filechip .fsize { color: var(--muted); flex-shrink: 0; }
.glut .filechip button {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    font-size: 0.82rem;
    font-weight: 400;
}
.glut .filechip button:hover {
    color: var(--danger);
    border-color: var(--danger);
    filter: none;
}

/* ---------- Buttons ---------- */
.glut button { padding: 0.7rem 1.4rem; font-size: 0.95rem; }
.glut button.ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--line);
    font-weight: 500;
}
.glut button.ghost:hover {
    border-color: var(--accent);
    background: rgba(169, 112, 255, 0.08);
    filter: none;
}

/* ---------- Ergebnis / Link ---------- */
.glut .linkrow {
    display: flex;
    gap: 0.65rem;
    margin: 0.9rem 0 0.4rem;
}
.glut .linkrow input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
}

/* ---------- Notiz-Anzeige ---------- */
.glut pre.note {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin-bottom: 0.9rem;
}
.glut .download {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}
.glut .download .fname { overflow-wrap: anywhere; }
.glut .download .fsize { color: var(--muted); }
.glut a.dlbtn {
    display: inline-block;
    margin-left: auto;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: filter 0.2s;
}
.glut a.dlbtn:hover { filter: brightness(1.15); }

/* Signatur: Tintenlinie, die nach dem letzten Abruf verblasst */
.glut .ink-line {
    height: 2px;
    border: none;
    margin: 0.25rem 0 0.9rem;
    background: linear-gradient(90deg, var(--accent), var(--accent-2) 40%, transparent);
    animation: inkdry 6s ease-out forwards;
}
@keyframes inkdry {
    to { filter: grayscale(1) brightness(0.6); opacity: 0.65; }
}
.glut .burned { color: var(--danger); font-size: 0.9rem; }

/* ---------- Fehler ---------- */
.glut .error {
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid var(--danger);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    font-size: 0.9rem;
    margin-top: 0.9rem;
}

/* ---------- Footer ---------- */
.glut footer {
    margin-top: 1rem;
    padding: 2rem 0 1.75rem;
}

@media (max-width: 480px) {
    .glut header { padding: 2rem 0 1.25rem; }
    .glut .wordmark { font-size: 2.2rem; }
    .glut .linkrow { flex-direction: column; }
    .glut .filechip .fname { max-width: 180px; }
}

/* =========================================================================
   KRYPTOBRIEF – Text ver-/entschlüsseln (Schlüsselpaar, Passwort, Schlüsselbund)
   Alle Regeln sind über body.krypto gescopt und beeinflussen die
   Portfolio- und GLUT-Seiten nicht.
   ========================================================================= */

.krypto {
    color-scheme: dark;   /* native Controls (Scrollbalken, Datei-Dialog) dunkel */
    overflow-x: hidden;
}

/* ---------- Kopf ---------- */
.krypto header {
    text-align: left;
    padding: 2.75rem 0 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 1.1rem;
    flex-wrap: wrap;
}
.krypto .wordmark {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 2.8rem;
    line-height: 1;
    color: var(--accent);
}
.krypto .tagline { font-size: 0.95rem; color: var(--muted); }

/* ---------- Tabs ---------- */
.krypto nav.tabs {
    margin: 0 0 1.25rem;
    display: flex;
    justify-content: flex-start;
    gap: 0.25rem;
    font-size: 1rem;
    border-bottom: 2px solid var(--line);
    /* scrollt in sich statt die Seite zu verschieben (mobil) */
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
.krypto nav.tabs::-webkit-scrollbar { display: none; }
.krypto nav.tabs button {
    background: none;
    border: none;
    border-radius: 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s, border-color 0.2s;
}
.krypto nav.tabs button:hover { color: var(--accent); filter: none; transform: none; }
.krypto nav.tabs button[aria-selected="true"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ---------- Panels & Karten ---------- */
.krypto section { padding: 0; }
.krypto section.panel { display: none; }
.krypto section.panel.active { display: block; }
.krypto .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.1rem;
}
.krypto .card h2 {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.9rem;
}
.krypto p.hint { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.9rem; }
.krypto label { margin: 0.9rem 0 0.35rem; }

/* ---------- Eingaben ---------- */
.krypto textarea,
.krypto input[type="password"],
.krypto input[type="text"] {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.krypto textarea { line-height: 1.6; }
.krypto textarea.msg { min-height: 110px; }
.krypto textarea.keybox { min-height: 90px; }
.krypto textarea.armor {
    background: #0b0813;
    color: #cdb8f2;
    min-height: 150px;
}

/* ---------- Zeilen & Buttons ---------- */
.krypto .row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}
.krypto .row select {
    width: auto;
    background: var(--surface-2);
    padding: 0.5rem 0.7rem;
    cursor: pointer;
}
.krypto button.btn { padding: 0.7rem 1.4rem; font-size: 0.95rem; }
.krypto button.btn.secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--line);
    font-weight: 500;
}
.krypto button.btn.secondary:hover {
    border-color: var(--accent);
    background: rgba(169, 112, 255, 0.08);
    filter: none;
}
.krypto button.btn.mini { padding: 0.3rem 0.7rem; font-size: 0.82rem; }

/* ---------- Status & Zustandschips ---------- */
.krypto .status { margin-top: 0.7rem; font-size: 0.9rem; min-height: 1.3em; }
.krypto .status.ok { color: var(--accent); }
.krypto .status.err { color: var(--danger); }
.krypto .keystate {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--muted);
}
.krypto .keystate.loaded {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(169, 112, 255, 0.1);
}

/* ---------- Schlüsselbund ---------- */
.krypto #vaultList { margin-top: 0.75rem; }
.krypto .ventry {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.krypto .ventry:last-child { border-bottom: none; }
.krypto .ventry .vname {
    font-weight: 600;
    flex: 1;
    min-width: 120px;
    word-break: break-word;
}
.krypto .vbadge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
}

/* ---------- Hilfe ---------- */
.krypto details.help { margin-top: 1.75rem; color: var(--muted); font-size: 0.9rem; }
.krypto details.help summary { cursor: pointer; font-weight: 600; color: var(--text); }
.krypto details.help ol { padding-left: 1.25rem; margin: 0.5rem 0; }
.krypto code {
    font-family: var(--font-mono);
    background: var(--surface-2);
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    font-size: 0.85em;
}

@media (max-width: 540px) {
    .krypto header { padding: 2rem 0 1rem; }
    .krypto .wordmark { font-size: 2.2rem; }
    .krypto nav.tabs button { padding: 0.7rem 0.55rem; font-size: 0.9rem; }
    .krypto .card { padding: 1rem 0.85rem; }
}
