/* ════════════════════════════════════════════════
   LASSE — SYSTEMINTEGRATOR
   shadcn-inspired · Dark · Refined
   ════════════════════════════════════════════════ */

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

:root {
    /* Background scale */
    --bg:        #09090B;
    --bg-1:      #0F0F11;
    --bg-2:      #18181B;
    --bg-3:      #27272A;

    /* Borders */
    --border:    rgba(255,255,255,.06);
    --border-md: rgba(255,255,255,.11);

    /* Foreground scale */
    --fg:    #FAFAFA;
    --mid:   #A1A1AA;
    --muted: #71717A;
    --dim:   #52525B;

    /* Accent */
    --accent:   #3B82F6;
    --accent-h: #5b96ff;

    /* Status */
    --green: #22C55E;
    --amber: #F59E0B;

    /* Typography */
    --sans: 'Figtree', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

    /* Layout */
    --nav-h: 60px;
    --max-w: 960px;
    --px:    40px;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    font-family: var(--sans);
    background-color: var(--bg);
    background-image:
        linear-gradient(to right,  rgba(128,128,128,.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(128,128,128,.055) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}


/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */

nav {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    z-index: 100;
    background: rgba(9,9,11,.78);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--fg);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2px;
    list-style: none;
}

.nav-links a {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--mid);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    letter-spacing: -0.01em;
    transition: color .16s, background .16s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--fg);
    background: rgba(255,255,255,.06);
}


/* ═══════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════ */

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--px);
}

section { padding: 120px 0; }


/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */

#hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-h);
    overflow: hidden;
}

/* Radial glow */
.hero-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% 30%, rgba(59,130,246,.13) 0%, transparent 62%),
        radial-gradient(ellipse 50% 36% at 50% 92%, rgba(34,197,94,.025) 0%, transparent 60%);
    pointer-events: none;
}

/* Content */
.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 700px;
    padding: 0 24px;
    width: 100%;
}

/* Avatar */
.hero-avatar-wrap { margin-bottom: 32px; }

.hero-avatar-img {
    width: 120px;
    height: auto;
    display: block;
}

/* Heading */
.hero-title {
    font-size: clamp(42px, 6.5vw, 78px);
    font-weight: 800;
    line-height: 1.0;
    letter-spacing: -0.04em;
    color: var(--fg);
    margin-bottom: 20px;
}

/* Sub */
.hero-sub {
    font-size: clamp(15px, 1.7vw, 18px);
    color: var(--mid);
    line-height: 1.68;
    letter-spacing: -0.01em;
    margin-bottom: 36px;
    max-width: 480px;
}

/* Buttons */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 44px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--sans);
    letter-spacing: -0.01em;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}

.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 18px rgba(59,130,246,.32);
}

.btn-primary:hover {
    background: var(--accent-h);
    box-shadow: 0 4px 26px rgba(59,130,246,.48);
}

.btn-ghost {
    background: rgba(255,255,255,.04);
    color: var(--fg);
    border-color: var(--border-md);
}

.btn-ghost:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.16);
}

/* Social icon buttons */
.hero-socials {
    display: flex;
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--mid);
    text-decoration: none;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.social-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(59,130,246,.38);
    transform: translateY(-2px) scale(1.06);
}

/* Scroll arrow */
.scroll-arrow {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--dim);
    opacity: 0;
    animation:
        arrowFadeIn  .5s  ease         1.1s forwards,
        arrowBounce  2s   ease-in-out  1.6s infinite;
}

@keyframes arrowFadeIn  { to { opacity: .45; } }
@keyframes arrowBounce  {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── Entrance animations ── */
.anim-scale {
    opacity: 0;
    transform: scale(.78);
    animation: entryScale .62s cubic-bezier(.34,1.56,.64,1) both;
    animation-delay: var(--d, .1s);
}

.anim-up {
    opacity: 0;
    transform: translateY(18px);
    animation: entryUp .55s ease both;
    animation-delay: var(--d, .1s);
}

.anim-fade {
    opacity: 0;
    animation: entryFade .55s ease both;
    animation-delay: var(--d, .1s);
}

@keyframes entryScale { to { opacity: 1; transform: scale(1); } }
@keyframes entryUp    { to { opacity: 1; transform: translateY(0); } }
@keyframes entryFade  { to { opacity: 1; } }


/* ═══════════════════════════════════════
   SHARED TYPOGRAPHIC TOKENS
   ═══════════════════════════════════════ */

.eyebrow {
    display: block;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-heading {
    font-size: clamp(34px, 4.8vw, 56px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.04em;
    color: var(--fg);
}


/* ═══════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════ */

#about { border-top: 1px solid var(--border); }

.about-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 80px;
    align-items: start;
}

.about-left {
    position: sticky;
    top: calc(var(--nav-h) + 48px);
}

.body-text {
    font-size: 15.5px;
    color: var(--mid);
    line-height: 1.8;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.body-text:last-of-type { margin-bottom: 0; }

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 28px;
}

.tag {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 11px;
    border-radius: 6px;
    background: rgba(255,255,255,.04);
    color: var(--muted);
    border: 1px solid rgba(255,255,255,.07);
    letter-spacing: .01em;
}


/* ═══════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════ */

#projekte { border-top: 1px solid var(--border); }

.section-head { margin-bottom: 52px; }

.project-card {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 40px;
    align-items: start;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 18px;
    transition: border-color .2s;
}

.project-card:last-child  { margin-bottom: 0; }
.project-card:hover       { border-color: var(--border-md); }

.project-logo-wrap {
    width: 128px;
    height: 128px;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-2);
    border: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.project-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--fg);
}
.project-name a {
    color: inherit;
    text-decoration: none;
}
.project-name a:hover {
    color: var(--accent-h);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: .03em;
}

.badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: badgePulse 2.4s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .3; }
}

.badge-warn {
    color: var(--amber);
    background: rgba(245,158,11,.08);
    border: 1px solid rgba(245,158,11,.20);
}
.badge-warn::before { background: var(--amber); }

.badge-done {
    color: var(--green);
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.20);
}
.badge-done::before { background: var(--green); }

.project-desc {
    font-size: 14px;
    color: var(--mid);
    line-height: 1.72;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
}

.inline-link {
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255,255,255,.2);
    transition: text-decoration-color .18s;
}

.inline-link:hover { text-decoration-color: var(--fg); }

.project-links {
    display: flex;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--dim);
    text-decoration: none;
    transition: color .16s;
}

.project-link:hover { color: var(--fg); }

/* Progress bar */
.progress-wrap {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.progress-label {
    font-family: var(--mono);
    font-size: 9.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--dim);
}

.progress-pct {
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .02em;
}

.progress-pct.done { color: var(--green); }
.progress-pct.warn { color: var(--amber); }

.progress-track {
    position: relative;
    height: 8px;
    border-radius: 99px;
    overflow: visible;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.09);
}

.progress-fill {
    position: relative;
    height: 100%;
    border-radius: 99px;
    overflow: hidden;
    width: var(--pct);
    animation: pbGrow 1.4s cubic-bezier(.22,1,.36,1) .5s both;
}

.progress-fill.done {
    background: linear-gradient(90deg, #0a6633 0%, #16a34a 50%, #22c55e 100%);
    box-shadow: 0 0 14px rgba(34,197,94,.45);
}

.progress-fill.warn {
    background: linear-gradient(90deg, #854d0e 0%, #d97706 50%, #f59e0b 100%);
    box-shadow: 0 0 14px rgba(245,158,11,.45);
}

@keyframes pbGrow {
    from { width: 0; }
    to   { width: var(--pct); }
}

/* Shimmer */
.progress-fill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.34) 50%, transparent 80%);
    transform: translateX(-200%);
    animation: pbShimmer 3.2s 2s ease-in-out infinite;
}

@keyframes pbShimmer {
    0%   { transform: translateX(-200%); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateX(400%); opacity: 0; }
}

/* End-cap */
.progress-cap {
    position: absolute;
    top: 50%;
    left: var(--pct);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.18);
    transform: translate(-50%, -50%);
    z-index: 5;
    animation: pbCapMove 1.4s cubic-bezier(.22,1,.36,1) .5s both;
}

@keyframes pbCapMove {
    from { left: 0; opacity: 0; }
    to   { left: var(--pct); opacity: 1; }
}

.progress-cap.done {
    background: radial-gradient(circle at 35% 35%, #86efac, #22c55e);
    box-shadow: 0 0 8px rgba(34,197,94,.9), 0 0 18px rgba(34,197,94,.4);
    animation:
        pbCapMove     1.4s cubic-bezier(.22,1,.36,1) .5s both,
        capPulseDone  2.8s ease-in-out 2s infinite;
}

.progress-cap.warn {
    background: radial-gradient(circle at 35% 35%, #fde68a, #f59e0b);
    box-shadow: 0 0 8px rgba(245,158,11,.9), 0 0 18px rgba(245,158,11,.4);
    animation:
        pbCapMove     1.4s cubic-bezier(.22,1,.36,1) .5s both,
        capPulseWarn  2.8s ease-in-out 2s infinite;
}

@keyframes capPulseDone {
    0%, 100% { box-shadow: 0 0 6px rgba(34,197,94,.8),  0 0 14px rgba(34,197,94,.35); }
    50%       { box-shadow: 0 0 12px rgba(34,197,94,1),  0 0 26px rgba(34,197,94,.60); }
}

@keyframes capPulseWarn {
    0%, 100% { box-shadow: 0 0 6px rgba(245,158,11,.8),  0 0 14px rgba(245,158,11,.35); }
    50%       { box-shadow: 0 0 12px rgba(245,158,11,1),  0 0 26px rgba(245,158,11,.60); }
}


/* ═══════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════ */

#contact {
    border-top: 1px solid var(--border);
    text-align: center;
}

.contact-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-heading {
    font-size: clamp(52px, 8.5vw, 96px);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: .94;
    color: var(--fg);
    margin-bottom: 20px;
}

.contact-sub {
    font-size: 16px;
    color: var(--mid);
    letter-spacing: -0.01em;
    margin-bottom: 40px;
}

.email-link {
    font-size: clamp(15px, 2.2vw, 22px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1.5px solid var(--accent);
    padding-bottom: 3px;
    transition: color .18s, border-color .18s;
}

.email-link:hover { color: var(--accent); }

.contact-socials {
    display: flex;
    gap: 24px;
    margin-top: 48px;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dim);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: color .18s;
}

.social-link:hover { color: var(--fg); }


/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */

footer { border-top: 1px solid var(--border); }

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 22px var(--px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    font-size: 12px;
    color: var(--dim);
    letter-spacing: -0.01em;
    font-weight: 500;
}


/* ═══════════════════════════════════════
   SCROLL REVEAL
   ═══════════════════════════════════════ */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .72s ease, transform .72s ease;
    transition-delay: var(--d, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ═══════════════════════════════════════
   SCROLL PROGRESS BAR
   ═══════════════════════════════════════ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(59,130,246,.6);
    z-index: 200;
    pointer-events: none;
    transition: width .06s linear;
}


/* ═══════════════════════════════════════
   CUSTOM CURSOR
   ═══════════════════════════════════════ */

.cursor-dot {
    position: fixed;
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity .3s, width .2s, height .2s, background .2s;
    will-change: left, top;
}

.cursor-ring {
    position: fixed;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(59,130,246,.35);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity .3s, width .25s, height .25s, border-color .2s;
    will-change: left, top;
}

.cursor-dot.active  { opacity: .9; }
.cursor-ring.active { opacity: .5; }

.cursor-dot.hovering  { width: 8px; height: 8px; background: #fff; }
.cursor-ring.hovering { width: 42px; height: 42px; border-color: rgba(59,130,246,.55); opacity: .7; }


/* ═══════════════════════════════════════
   TOAST
   ═══════════════════════════════════════ */

.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--bg-2);
    border: 1px solid var(--border-md);
    color: var(--mid);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .02em;
    padding: 9px 18px;
    border-radius: 8px;
    z-index: 999;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    pointer-events: none;
    box-shadow: 0 8px 30px rgba(0,0,0,.6);
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════
   HAMBURGER
   ═══════════════════════════════════════ */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    background: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 7px;
    transition: border-color .18s, background .18s;
}

.hamburger:hover {
    background: rgba(255,255,255,.05);
    border-color: var(--border);
}

.hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--mid);
    border-radius: 1px;
    transition: transform .25s ease, opacity .2s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 768px) {
    :root { --px: 20px; }

    .nav-links { display: none; }
    .hamburger { display: flex; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: rgba(9,9,11,.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 8px 0;
        z-index: 98;
        gap: 0;
        animation: slideDown .18s ease;
    }

    .nav-links.open li            { border-bottom: 1px solid var(--border); }
    .nav-links.open li:last-child { border-bottom: none; }
    .nav-links.open a             { display: block; padding: 14px 20px; font-size: 15px; border-radius: 0; }

    section { padding: 80px 0; }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .about-left { position: static; }

    .project-card {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .project-logo-wrap {
        width: 88px;
        height: 88px;
        border-radius: 18px;
    }

    .scroll-arrow { display: none; }

    .footer-inner {
        padding: 20px var(--px);
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-actions    { flex-direction: column; align-items: stretch; }
    .btn             { justify-content: center; }
    .contact-heading { letter-spacing: -0.048em; }
}
