/*
Theme Name: Nicolascloud Theme
Author: Nicolas Cloud
Description: Klassisches WordPress-Theme für das Nicolascloud-Portfolio mit Gutenberg-Inhalten.
Version: 2.0.0
Text Domain: nicolascloud
*/

:root {
    --bg: #0a0d11;
    --bg-soft: #0f141a;
    --surface: #11171f;
    --surface-2: #161d27;
    --border: #1f2731;
    --border-soft: #161d26;
    --text: #e8ecf1;
    --text-dim: #a4aebc;
    --text-mute: #6b7785;
    --accent: oklch(0.80 0.10 195);
    --accent-strong: oklch(0.85 0.12 195);
    --accent-soft: oklch(0.80 0.10 195 / 0.12);
    --accent-line: oklch(0.80 0.10 195 / 0.35);
    --danger: oklch(0.70 0.16 25);
    --warn-line: oklch(0.72 0.10 80 / 0.45);
    --warn-soft: oklch(0.72 0.10 80 / 0.10);
    --warn-text: oklch(0.80 0.10 80);
    --radius: 10px;
    --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px -16px rgba(0, 0, 0, 0.6);
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --max: 1080px;
    --gutter: clamp(20px, 4vw, 40px);
    --section-y: clamp(64px, 10vw, 112px);
}

:root[data-theme="light"] {
    --bg: #f7f7f4;
    --bg-soft: #efefe9;
    --surface: #ffffff;
    --surface-2: #fafaf6;
    --border: #e2e2da;
    --border-soft: #ecece4;
    --text: #15181c;
    --text-dim: #4a525c;
    --text-mute: #79828d;
    --accent: oklch(0.52 0.09 195);
    --accent-strong: oklch(0.46 0.10 195);
    --accent-soft: oklch(0.52 0.09 195 / 0.10);
    --accent-line: oklch(0.52 0.09 195 / 0.40);
    --warn-line: oklch(0.58 0.10 70 / 0.5);
    --warn-soft: oklch(0.58 0.10 70 / 0.10);
    --warn-text: oklch(0.50 0.10 70);
    --shadow-1: 0 1px 0 rgba(0, 0, 0, 0.02) inset, 0 8px 24px -18px rgba(20, 30, 40, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01", "cv11";
}
::selection { background: var(--accent-soft); color: var(--text); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }

.site-main, .entry-content, .entry-content > * { margin-block-start: 0; }
.entry-content::after { clear: both; content: ""; display: table; }
.entry-content .wp-block-group, .entry-content .wp-block-columns { margin-block-start: 0; margin-block-end: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.alignwide { max-width: var(--max); margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; }
.home-section { padding: var(--section-y) 0; }
.home-section + .home-section { border-top: 1px solid var(--border-soft); }

h1, h2, h3 { color: var(--text); font-weight: 600; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.4vw, 64px); line-height: 1.05; }
h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; margin-bottom: 32px; }
h3 { font-size: 18px; line-height: 1.3; }
p { color: var(--text-dim); margin: 0 0 16px; max-width: 62ch; text-wrap: pretty; }
p strong { color: var(--text); font-weight: 600; }

/* Kopfzeile */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in oklab, var(--bg) 78%, transparent);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color .25s ease, background .25s ease;
}
.topbar.scrolled, .page-template-page-impressum .topbar, .page-template-default .topbar { border-bottom-color: var(--border-soft); }
.admin-bar .topbar { top: 32px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-mono); font-size: 13px; letter-spacing: .02em; }
.brand-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--accent-line); border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 6px; color: var(--text-dim); font-size: 13.5px; transition: color .15s ease, background .15s ease; }
.nav a:hover { background: var(--surface); color: var(--text); }
.controls { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .lang-toggle { display: inline-grid; place-items: center; height: 36px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-dim); transition: color .15s ease, border-color .15s ease, background .15s ease; }
.theme-toggle { width: 36px; }
.lang-toggle { padding: 0 11px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.theme-toggle:hover, .lang-toggle:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Startseite */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--text-mute); font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: lowercase; }
.eyebrow::before { width: 18px; height: 1px; background: var(--accent); content: ""; }
.hero { padding-top: clamp(56px, 9vw, 96px); padding-bottom: clamp(56px, 9vw, 96px); }
.wp-block-columns.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center !important; gap: clamp(32px, 6vw, 72px); margin-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 6px 12px 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: oklch(0.78 0.16 145); box-shadow: 0 0 0 3px oklch(0.78 0.16 145 / .18); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.hero h1 .accent { color: var(--accent); }
.role { margin: 18px 0 22px; color: var(--text-dim); font-family: var(--font-mono); font-size: 14px; letter-spacing: .01em; }
.hero p.tagline { max-width: 52ch; margin-bottom: 32px; color: var(--text-dim); font-size: 18px; }
.wp-block-buttons.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cta .wp-block-button__link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.hero-cta .wp-block-button__link:hover { border-color: var(--accent-line); background: var(--surface-2); }
.hero-cta .primary .wp-block-button__link { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-strong); }

/* Formularplatz und Formular-Plugins */
.hero-form { max-width: 420px; margin-left: auto; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1); }
.hero-form-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft); }
.hero-form-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero-form-head .label { color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; }
.form-slot-instruction { margin: 0 0 18px; padding: 14px; border: 1px dashed var(--accent-line); border-radius: 8px; background: var(--accent-soft); color: var(--text-dim); font-size: 13px; }
.form-hint { margin: 12px 0 0; color: var(--text-mute); font-family: var(--font-mono); font-size: 11px; line-height: 1.5; }
.hero-form form, .hero-form .wpforms-container, .hero-form .wpcf7, .hero-form .fluentform { margin: 0; }
.hero-form label { display: block; margin-bottom: 6px; color: var(--text-mute); font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.hero-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), .hero-form textarea, .hero-form select { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); color: var(--text); font: inherit; font-size: 14px; }
.hero-form textarea { min-height: 96px; resize: vertical; }
.hero-form input:focus, .hero-form textarea:focus, .hero-form select:focus { outline: none; border-color: var(--accent-line); background: var(--bg); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero-form button[type="submit"], .hero-form input[type="submit"] { display: inline-flex; justify-content: center; width: 100%; margin-top: 4px; padding: 10px 16px; border: 1px solid var(--accent-line); border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; }

.wp-block-columns.about-grid { display: grid; grid-template-columns: 220px 1fr; align-items: start !important; gap: clamp(24px, 5vw, 56px); margin-bottom: 0; }
.about-grid h2 { margin: 0; }
.about-body p { font-size: 17px; }
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.skill-card { padding: 22px 22px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .2s ease; }
.skill-card > *, .project-card > * { margin-block-start: 0; }
.skill-card:hover { border-color: var(--accent-line); }
.skill-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.skill-head p, .skill-head h3 { margin: 0; }
.skill-index { color: var(--text-mute); font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }
.skill-card h3 { font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; max-width: none; margin: 0; }
.tag { padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-soft); color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; transition: color .15s ease, border-color .15s ease; }
.tag:hover { border-color: var(--accent-line); color: var(--text); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.project-card { display: flex; flex-direction: column; min-height: 220px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .2s ease, transform .2s ease; }
.project-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.project-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.project-head h3, .project-head p { margin: 0; }
.project-card h3 { font-size: 19px; }
.project-meta { color: var(--text-mute); font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }
.project-desc { flex: 1; margin-bottom: 18px; color: var(--text-dim); font-size: 14.5px; }
.project-card > .tags { margin-bottom: 18px; }
.project-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.project-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; }
.project-link:hover { color: var(--accent); }
.project-link svg { width: 12px; height: 12px; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.service-card { display: block; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .2s ease, background .2s ease; }
a.service-card:hover { border-color: var(--accent-line); background: var(--surface-2); }
.service-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.service-name { color: var(--text); font-size: 16px; font-weight: 600; }
.service-arrow { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-mute); }
.service-arrow svg { width: 12px; height: 12px; }
.service-url { margin-bottom: 14px; color: var(--text-dim); font-family: var(--font-mono); font-size: 12.5px; word-break: break-all; }
.service-foot { display: flex; align-items: center; gap: 8px; color: var(--text-mute); font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; }
.service-foot::before { width: 6px; height: 6px; border-radius: 50%; background: oklch(0.78 0.16 145); content: ""; }
.service-card.internal .service-foot::before { background: oklch(0.72 0.10 80); }
.service-card.internal .service-url { max-width: 42ch; color: var(--text-dim); font-family: var(--font-sans); font-size: 13px; line-height: 1.55; word-break: normal; }
.service-card.internal .tags { margin-bottom: 16px; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.contact-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .2s ease, background .2s ease; }
.contact-item:hover { border-color: var(--accent-line); background: var(--surface-2); }
.contact-label { margin-bottom: 4px; color: var(--text-mute); font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.contact-value { color: var(--text); font-size: 14.5px; word-break: break-all; }
.contact-icon { display: inline-grid; flex-shrink: 0; place-items: center; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-mute); }
.contact-item:hover .contact-icon { border-color: var(--accent-line); color: var(--accent); }
.contact-icon svg { width: 14px; height: 14px; }

/* Impressum und normale Seiten */
.page-template-page-impressum { --max: 760px; }
.legal-page, .generic-page { padding-top: clamp(40px, 7vw, 72px); padding-bottom: 80px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 28px; color: var(--text-mute); font-family: var(--font-mono); font-size: 12px; }
.back-link:hover { color: var(--accent); }
.back-link svg { width: 13px; height: 13px; }
.page-title { margin: 0 0 8px; font-size: clamp(30px, 5vw, 42px); line-height: 1.1; }
.page-sub { margin: 0 0 40px; color: var(--text-mute); font-family: var(--font-mono); font-size: 12px; letter-spacing: .03em; }
.legal h2 { margin: 48px 0 6px; padding-top: 28px; border-top: 1px solid var(--border-soft); font-size: 22px; scroll-margin-top: 76px; }
.legal h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.legal .h2-index { display: block; margin-bottom: 8px; color: var(--accent); font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }
.legal h3 { margin: 28px 0 6px; font-size: 16px; }
.legal p { max-width: 64ch; margin: 0 0 14px; color: var(--text-dim); }
.legal ul { margin: 0 0 14px; padding-left: 20px; color: var(--text-dim); }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--text); }
.legal a { color: var(--accent); word-break: break-word; }
.legal a:hover { text-decoration: underline; }
.ph { padding: 1px 6px; border: 1px solid var(--warn-line); border-radius: 5px; background: var(--warn-soft); color: var(--warn-text); font-family: var(--font-mono); font-size: .86em; }
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 4px 20px; margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.kv dt { align-self: center; color: var(--text-mute); font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; }
.kv dd { margin: 0; color: var(--text); font-size: 14.5px; }

/* Fußzeile */
.site-footer { padding: 40px 0 56px; border-top: 1px solid var(--border-soft); color: var(--text-mute); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; color: var(--text-mute); font-family: var(--font-mono); font-size: 12px; }
.foot-inner a:hover { color: var(--accent); }
.foot-links { display: flex; gap: 18px; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.editor-styles-wrapper .reveal { opacity: 1; transform: none; }

@media (max-width: 820px) {
    .wp-block-columns.hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-form { max-width: 100%; margin-left: 0; }
}
@media (max-width: 782px) { .admin-bar .topbar { top: 46px; } }
@media (max-width: 720px) {
    .nav { display: none; }
    .wp-block-columns.about-grid { grid-template-columns: 1fr; gap: 16px; }
    .skills-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .status-dot { animation: none; }
}
