/* ============================================================
   patrickschauss.de — Design-System
   Dark / Cinematic / Neon-Cyan  (Markenfarbe der alten Seite)
   ============================================================ */

:root {
    --bg: #060608;
    --bg-2: #0b0b10;
    --bg-3: #111118;
    --fg: #f2f2f5;
    --fg-dim: #9a9aa6;
    --accent: #4ffcf9;
    --accent-2: #7b5cff;
    --line: rgba(255, 255, 255, 0.08);
    --font-head: "Space Grotesk", system-ui, sans-serif;
    --font-body: "Archivo", system-ui, sans-serif;
    --max: 1240px;
    --pad: clamp(20px, 4vw, 48px);
    --radius: 18px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

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

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.75;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #000; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.08;
    margin: 0 0 0.5em;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ---------- Film-Grain Overlay ---------- */
.noise {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 8s steps(10) infinite;
}
@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-3%, 2%); }
    40% { transform: translate(2%, -3%); }
    60% { transform: translate(-2%, -2%); }
    80% { transform: translate(3%, 3%); }
}

/* ---------- Custom Cursor ---------- */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
.cursor-dot, .cursor-ring {
    position: absolute;
    top: 0; left: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    will-change: transform;
}
.cursor-dot { width: 8px; height: 8px; background: var(--accent); }
.cursor-ring {
    width: 40px; height: 40px;
    border: 1.5px solid rgba(79, 252, 249, 0.5);
    transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s;
}
body.cursor-hover .cursor-ring { width: 64px; height: 64px; border-color: var(--accent); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Page Transition ---------- */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--bg-2);
    z-index: 9990;
    transform: translateY(101%);
    display: grid;
    place-items: center;
    pointer-events: none;
}
.page-transition .pt-logo {
    font-family: var(--font-head);
    font-size: clamp(40px, 8vw, 96px);
    font-weight: 700;
    color: var(--accent);
    opacity: 0;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px var(--pad);
    mix-blend-mode: normal;
    transition: background 0.4s, backdrop-filter 0.4s;
}
.site-header.is-scrolled {
    background: rgba(6, 6, 8, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.logo {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 0.02em;
}
.logo-dot { color: var(--accent); }
.main-nav { display: flex; gap: 34px; align-items: center; }
.nav-link {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-dim);
    transition: color 0.25s;
    overflow: hidden;
}
.nav-link:hover { color: var(--fg); }
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: -4px;
    width: 100%; height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s var(--ease);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
    color: var(--accent);
    border: 1px solid rgba(79, 252, 249, 0.4);
    padding: 9px 20px;
    border-radius: 100px;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.nav-cta:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 32px rgba(79, 252, 249, 0.4);
}
.nav-cta::after { display: none; }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 44px; height: 44px;
    cursor: pointer;
    flex-direction: column;
    gap: 7px;
    align-items: center;
    justify-content: center;
    z-index: 102;
}
.nav-toggle span {
    display: block;
    width: 26px; height: 2px;
    background: var(--fg);
    transition: transform 0.3s var(--ease), opacity 0.3s;
}
body.menu-open .nav-toggle span:first-child { transform: translateY(4.5px) rotate(45deg); }
body.menu-open .nav-toggle span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 8, 0.96);
    backdrop-filter: blur(20px);
    z-index: 101;
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.mobile-menu a {
    font-family: var(--font-head);
    font-size: clamp(34px, 9vw, 56px);
    font-weight: 700;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.5s var(--ease), opacity 0.5s, color 0.25s;
}
.mobile-menu a:hover { color: var(--accent); }
body.menu-open .mobile-menu a { transform: none; opacity: 1; }
body.menu-open .mobile-menu a:nth-child(2) { transition-delay: 0.06s; }
body.menu-open .mobile-menu a:nth-child(3) { transition-delay: 0.12s; }
body.menu-open .mobile-menu a:nth-child(4) { transition-delay: 0.18s; }

@media (max-width: 860px) {
    .main-nav { display: none; }
    .nav-toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    place-items: center;
    overflow: hidden;
}
#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 var(--pad);
    max-width: 1100px;
}
.hero-kicker {
    font-size: 13px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}
.hero-title {
    font-size: clamp(56px, 12vw, 160px);
    line-height: 0.95;
    margin: 0 0 26px;
    text-transform: uppercase;
}
.hero-line { display: block; overflow: hidden; }
.hero-line > span { display: inline-block; will-change: transform; }
.hero-line-accent > span {
    color: transparent;
    -webkit-text-stroke: 2px var(--accent);
    text-shadow: 0 0 60px rgba(79, 252, 249, 0.35);
}
.hero-roles {
    font-family: var(--font-head);
    font-size: clamp(17px, 2.4vw, 24px);
    color: var(--fg-dim);
    min-height: 1.6em;
    margin: 0 0 38px;
}
.typed-caret { color: var(--accent); animation: caret 0.9s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.hero-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--fg-dim);
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}
.hero-scroll i {
    width: 1px; height: 46px;
    background: linear-gradient(var(--accent), transparent);
    animation: scrollhint 1.8s var(--ease) infinite;
}
@keyframes scrollhint {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Buttons ---------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 34px;
    border-radius: 100px;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.05em;
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s, color 0.3s, background 0.3s;
    cursor: pointer;
    border: 0;
}
.btn span { position: relative; z-index: 1; }
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { box-shadow: 0 0 44px rgba(79, 252, 249, 0.45); }
.btn-ghost {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 20px 48px; font-size: 17px; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 150px) 0; position: relative; }
.section-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section-inner.narrow { max-width: 800px; }
.section-kicker {
    font-size: 12px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 14px;
}
.section-title {
    font-size: clamp(34px, 5.5vw, 64px);
    margin-bottom: 0.8em;
}
.grid-2 {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(40px, 6vw, 90px);
    align-items: center;
}
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about { background: linear-gradient(var(--bg), var(--bg-2)); }
.about-bio p { color: var(--fg-dim); }
.about-portrait { position: relative; max-width: 420px; justify-self: center; }
.about-portrait img {
    border-radius: var(--radius);
    filter: grayscale(0.9) contrast(1.1);
    transition: filter 0.5s;
}
.about-portrait:hover img { filter: grayscale(0) contrast(1); }
.portrait-frame {
    position: absolute;
    inset: -14px;
    border: 1px solid rgba(79, 252, 249, 0.35);
    border-radius: calc(var(--radius) + 8px);
    transform: translate(12px, 12px);
    pointer-events: none;
}

/* ---------- Skills ---------- */
.skills { background: var(--bg-2); }
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(32px, 4vw, 60px);
}
.skill-group h3 {
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 22px;
}
.skill { margin-bottom: 20px; }
.skill-head {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-dim);
    margin-bottom: 8px;
}
.skill-num { font-family: var(--font-head); color: var(--fg); }
.skill-num::after { content: "%"; opacity: 0.5; }
.skill-bar {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}
.skill-bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    box-shadow: 0 0 14px rgba(79, 252, 249, 0.6);
}

/* ---------- Work Grid ---------- */
.work-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: clamp(32px, 5vw, 60px);
}
.work-head .section-title { margin-bottom: 0; }
.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(18px, 2.5vw, 32px);
}
@media (max-width: 1000px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .work-grid { grid-template-columns: 1fr; } }
.work-card {
    position: relative;
    border-radius: var(--radius);
    background: var(--bg-3);
    border: 1px solid var(--line);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: border-color 0.3s, box-shadow 0.4s;
    will-change: transform;
}
.work-card:hover {
    border-color: rgba(79, 252, 249, 0.5);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(79, 252, 249, 0.08);
}
.work-media { aspect-ratio: 1 / 1; overflow: hidden; }
.work-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease), filter 0.5s;
    filter: saturate(0.85);
}
.work-card:hover .work-media img { transform: scale(1.06); filter: saturate(1.15); }
.work-info { padding: 20px 22px 22px; }
.work-info h3 { font-size: 20px; margin: 0 0 4px; }
.work-info p {
    margin: 0;
    font-size: 12.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-dim);
}
.work-card.is-hidden { display: none; }

/* ---------- Filter ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn {
    background: transparent;
    color: var(--fg-dim);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 9px 20px;
    font-family: var(--font-head);
    font-size: 13.5px;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.25s;
}
.filter-btn:hover { color: var(--fg); border-color: rgba(255, 255, 255, 0.3); }
.filter-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

/* ---------- Timeline ---------- */
.timeline-section { background: var(--bg-2); }
.timeline { position: relative; padding-left: 30px; max-width: 820px; }
.timeline::before {
    content: "";
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 1px;
    background: linear-gradient(rgba(79,252,249,0.7), rgba(123,92,255,0.4), transparent);
}
.timeline-item { position: relative; padding: 0 0 44px 26px; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -35px; top: 8px;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    box-shadow: 0 0 16px rgba(79, 252, 249, 0.6);
}
.timeline-period {
    font-family: var(--font-head);
    font-size: 14px;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 6px;
}
.timeline-body h3 { font-size: 21px; margin-bottom: 8px; }
.timeline-body ul { margin: 0; padding-left: 18px; color: var(--fg-dim); }
.timeline-body li { margin-bottom: 3px; }

/* ---------- CTA / Footer ---------- */
.cta-section { text-align: center; }
.cta-title {
    font-size: clamp(40px, 7vw, 90px);
    margin-bottom: 40px;
}
.cta-title em {
    font-style: normal;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
}
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: clamp(50px, 7vw, 90px) var(--pad) 34px; }
.footer-kicker {
    font-size: 12px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--fg-dim);
    margin-bottom: 10px;
}
.footer-mail {
    font-family: var(--font-head);
    font-size: clamp(24px, 4.4vw, 52px);
    font-weight: 700;
    color: var(--fg);
    transition: color 0.25s;
}
.footer-mail:hover { color: var(--accent); }
.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 50px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    color: var(--fg-dim);
    font-size: 13.5px;
}
.footer-meta p { margin: 0; }
.footer-nav { display: flex; gap: 22px; }
.footer-nav a { color: var(--fg-dim); transition: color 0.25s; }
.footer-nav a:hover { color: var(--accent); }

/* ---------- Unterseiten-Kopf ---------- */
.page-head { padding: clamp(150px, 22vh, 240px) 0 clamp(20px, 4vw, 40px); }
.page-title {
    font-size: clamp(44px, 9vw, 120px);
    text-transform: uppercase;
    line-height: 0.98;
    margin: 0;
}
.page-title span, .page-title em { display: inline-block; }
.page-title em {
    font-style: normal;
    color: transparent;
    -webkit-text-stroke: 2px var(--accent);
}
.page-title-sm { font-size: clamp(32px, 5.5vw, 64px); text-transform: none; }

/* ---------- Projekt-Detail ---------- */
.project-cover-media {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
}
.project-body p { color: var(--fg-dim); font-size: 18px; }
.project-meta-grid { align-items: start; }
.facts { margin: 0; display: flex; flex-direction: column; gap: 0; }
.fact {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.fact dt {
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-dim);
}
.fact dd { margin: 0; font-family: var(--font-head); }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: clamp(16px, 2.5vw, 30px);
}
.gallery-item {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-3);
}
.gallery-item img { width: 100%; transition: transform 0.6s var(--ease); }
.gallery-item:hover img { transform: scale(1.04); }
.next-project { border-top: 1px solid var(--line); }
.next-link {
    font-family: var(--font-head);
    font-size: clamp(26px, 4.5vw, 54px);
    font-weight: 700;
    transition: color 0.25s;
}
.next-link:hover { color: var(--accent); }

/* ---------- Blog ---------- */
.post-list { display: flex; flex-direction: column; }
.post-row {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: clamp(20px, 3vw, 40px);
    align-items: center;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
    transition: padding-left 0.3s var(--ease), border-color 0.3s;
}
.post-row:hover { padding-left: 14px; border-color: rgba(79, 252, 249, 0.4); }
.post-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-3);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-info time {
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
}
.post-info h2 { font-size: clamp(20px, 2.6vw, 28px); margin: 6px 0 8px; }
.post-info p { margin: 0; color: var(--fg-dim); font-size: 15px; }
.post-arrow {
    font-size: 28px;
    color: var(--fg-dim);
    transition: transform 0.3s var(--ease), color 0.3s;
}
.post-row:hover .post-arrow { transform: translateX(8px); color: var(--accent); }
@media (max-width: 700px) {
    .post-row { grid-template-columns: 1fr; }
    .post-thumb { max-width: 100%; }
    .post-arrow { display: none; }
}
.post-cover img { border-radius: var(--radius); border: 1px solid var(--line); }
.prose p { color: #c9c9d2; }
.prose ul { color: #c9c9d2; }
.prose a { color: var(--accent); }

/* ---------- Kontakt ---------- */
.contact-grid { align-items: start; }
.contact-info p { color: var(--fg-dim); }
.contact-mail {
    display: inline-block;
    font-family: var(--font-head);
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 700;
    color: var(--accent);
    margin: 16px 0;
    word-break: break-all;
}
.contact-loc { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; }
.contact-note {
    font-size: 14px;
    color: var(--fg-dim);
    border-left: 2px solid var(--accent);
    padding-left: 14px;
    margin-top: 26px;
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; }
.contact-form label span {
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-dim);
}
.contact-form input, .contact-form textarea {
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--fg);
    padding: 15px 18px;
    font: inherit;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 252, 249, 0.15);
}
.contact-form .hp { position: absolute; left: -9999px; opacity: 0; height: 0; }
.form-error {
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid rgba(255, 80, 80, 0.4);
    color: #ff9c9c;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 0;
}
.form-success h2 { color: var(--accent); }

/* ---------- 404 ---------- */
.err-page { text-align: center; padding-bottom: 120px; }
.err-code {
    font-size: clamp(100px, 24vw, 280px);
    margin: 0;
    color: transparent;
    -webkit-text-stroke: 2px var(--accent);
    text-shadow: 0 0 80px rgba(79, 252, 249, 0.25);
}
.err-text { color: var(--fg-dim); margin: 0 0 30px; }

/* ---------- Reveal (JS setzt Endzustand) ---------- */
.reveal { opacity: 0; transform: translateY(40px); }
html.no-js .reveal, html.reduced-motion .reveal { opacity: 1; transform: none; }

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .noise, .hero-scroll i, .typed-caret { animation: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; }
    html { scroll-behavior: auto; }
}
