/* ============================================================
   Krzysztof Ślusarski — JVM Performance
   Framework-free stylesheet
   ============================================================ */

:root {
    --bg:          #0a0f1e;
    --bg-2:        #0c1124;
    --panel:       #111a31;
    --panel-2:     #0e1730;
    --border:      rgba(255, 255, 255, .08);
    --border-str:  rgba(255, 255, 255, .15);
    --text:        #e9eefb;
    --muted:       #9aa7c6;
    --muted-2:     #6c789a;
    --accent:      #2b93f0;
    --accent-2:    #2fe0c4;
    --accent-ink:  #061018;
    --grad:        var(--accent);                  /* gradients removed — solid accent */
    --grad-soft:   rgba(43, 147, 240, .14);        /* solid soft-accent (was gradient) */

    --radius:      14px;
    --radius-lg:   22px;
    --maxw:        1140px;
    --gutter:      clamp(20px, 5vw, 40px);

    --shadow:      0 24px 60px -24px rgba(0, 0, 0, .7);
    --shadow-glow: 0 0 0 1px var(--border), 0 30px 70px -30px rgba(43, 147, 240, .5);

    --font-head:   "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-body:   "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    --font-mono:   ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* flat background — page-wide ambient glow removed */

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -.02em; }

::selection { background: rgba(43, 147, 240, .35); color: #fff; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
    position: relative;
    z-index: 1;
}

.skip-link {
    position: absolute;
    left: 16px; top: -100px;
    background: var(--accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    z-index: 200;
    transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

.grad {
    color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
    --pad-y: .9em;
    display: inline-flex;
    align-items: center;
    gap: .55em;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .98rem;
    padding: var(--pad-y) 1.5em;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
    white-space: nowrap;
}
.btn--primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 14px 30px -12px rgba(43, 147, 240, .65);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(43, 147, 240, .8); }
.btn--ghost {
    background: rgba(255, 255, 255, .03);
    border-color: var(--border-str);
    color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); background: rgba(43, 147, 240, .1); transform: translateY(-2px); }

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin: 0 0 1rem;
}
.eyebrow__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 0 4px rgba(47, 224, 196, .2);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }

.section__head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section__title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.section__sub { color: var(--muted); font-size: 1.08rem; margin: 1rem 0 0; }
.talks__note { color: var(--muted); font-size: .95rem; font-style: italic; margin: .65rem 0 0; }
.talks__note:empty { display: none; }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
    border-bottom: 1px solid transparent;
}
.site-header.scrolled {
    background: rgba(10, 15, 30, .8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--border);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--font-head); margin-right: auto; }
.brand__avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-str); object-fit: cover; }
.brand__name { font-weight: 500; font-size: 1.02rem; letter-spacing: -.01em; }
.brand__name strong { font-weight: 700; }

/* language switcher */
.nav__actions { display: flex; align-items: center; gap: .6rem; }
.lang { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); border-radius: 999px; }
.lang__btn { display: inline-flex; align-items: center; gap: .4em; padding: .32em .6em; border: 0; background: transparent; color: var(--muted); font-family: var(--font-head); font-weight: 600; font-size: .82rem; line-height: 1; border-radius: 999px; cursor: pointer; transition: color .2s ease, background .2s ease; }
.lang__btn:hover { color: var(--text); }
.lang__btn.is-active { color: var(--text); background: rgba(255, 255, 255, .09); }
.flag { width: 20px; height: 13px; display: block; flex: none; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .25); opacity: .55; transition: opacity .2s ease; }
.lang__btn:hover .flag, .lang__btn.is-active .flag { opacity: 1; }

.nav__menu { display: flex; align-items: center; gap: .35rem; }
.nav__menu a {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .95rem;
    color: var(--muted);
    padding: .55em .85em;
    border-radius: 999px;
    transition: color .2s ease, background .2s ease;
}
.nav__menu a:hover { color: var(--text); }
.nav__menu a.is-current { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav__cta {
    margin-left: .4rem;
    color: var(--accent-ink) !important;
    background: var(--accent);
    font-weight: 600 !important;
}
.nav__cta:hover { filter: brightness(1.05); }

.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: transparent;
    border: 1px solid var(--border-str);
    border-radius: 12px;
    cursor: pointer;
}
.nav__toggle span {
    display: block;
    width: 20px; height: 2px;
    margin-inline: auto;
    background: var(--text);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative;
    padding-top: clamp(120px, 18vh, 180px);
    padding-bottom: clamp(60px, 9vw, 110px);
    overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__grid {
    position: absolute; inset: -2px;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(80% 60% at 50% 30%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(80% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero__blob { display: none; }  /* decorative colour blobs removed */

.hero__inner {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}
/* allow grid items to shrink below content min-size (prevents overflow on mobile) */
.hero__copy, .hero__media { min-width: 0; }
.hero__title {
    font-size: clamp(2.1rem, 5.4vw, 3.7rem);
    line-height: 1.06;
    margin: 0 0 1.3rem;
}
.hero__lead { color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.18rem); max-width: 36em; margin: 0 0 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.6rem; }

.stats { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 48px); margin: 0; }
.stat__num {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    line-height: 1;
    background: var(--grad);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__num span { -webkit-text-fill-color: var(--accent-2); }
.stat__label { color: var(--muted); font-size: .92rem; margin: .4rem 0 0; }

/* Hero media */
.hero__media { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.portrait { position: relative; width: min(360px, 80%); }
.portrait__glow {
    position: absolute; inset: -14%;
    background: var(--grad);
    border-radius: 32px;
    filter: blur(40px);
    opacity: .14;
}
.portrait__img {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 26px;
    border: 1px solid var(--border-str);
    box-shadow: var(--shadow);
}
.portrait::after { /* accent ring */
    content: "";
    position: absolute; inset: 0;
    border-radius: 26px;
    padding: 1.5px;
    background: var(--grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: .8;
    pointer-events: none;
}
.portrait__badge {
    position: absolute;
    bottom: -18px; left: -18px;
    background: rgba(14, 23, 48, .85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-str);
    border-radius: 16px;
    padding: .7rem 1rem;
    box-shadow: var(--shadow);
}
.portrait__badge-k { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.portrait__badge-v { display: block; font-size: .78rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; width: 100%; }
.chips li {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--muted);
    padding: .4em .8em;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .02);
}

/* ============================================================
   Services cards
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(18px, 2.5vw, 28px); }
.card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(26px, 3vw, 38px);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 3px;
    background: var(--grad);
    transform: scaleX(0); transform-origin: left;
    transition: transform .35s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-str); box-shadow: var(--shadow); }
.card:hover::before { transform: scaleX(1); }
.card__icon {
    width: 54px; height: 54px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: var(--grad-soft);
    border: 1px solid var(--border);
    color: var(--accent-2);
    margin-bottom: 1.3rem;
}
.card__icon svg { width: 26px; height: 26px; }
.card__title { font-size: 1.28rem; margin-bottom: .7rem; }
.card__desc { color: var(--muted); margin: 0 0 1.3rem; }
.card__list { display: grid; gap: .6rem; }
.card__list li { position: relative; padding-left: 1.7rem; color: var(--text); font-size: .96rem; }
.card__list li::before {
    content: "";
    position: absolute; left: 0; top: .55em;
    width: 9px; height: 9px;
    border-radius: 3px;
    background: var(--grad);
}

/* ============================================================
   Process / steps
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: clamp(18px, 2.5vw, 28px); counter-reset: step; }
.step {
    position: relative;
    padding: clamp(24px, 3vw, 32px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .015);
}
.step__num {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-ink);
    background: var(--grad);
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 12px;
    margin-bottom: 1.1rem;
}
.step__title { font-size: 1.2rem; margin-bottom: .5rem; }
.step p { color: var(--muted); margin: 0; font-size: .97rem; }

/* ============================================================
   GC feature
   ============================================================ */
.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(30px, 4vw, 56px);
}
.feature__desc { color: var(--muted); margin: 1rem 0 1.8rem; font-size: 1.05rem; }

.terminal {
    border: 1px solid var(--border-str);
    border-radius: 14px;
    background: #070b16;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.terminal__bar {
    display: flex; align-items: center; gap: .5rem;
    padding: .7rem .9rem;
    background: rgba(255, 255, 255, .03);
    border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot--r { background: #ff5f57; } .dot--y { background: #febc2e; } .dot--g { background: #28c840; }
.terminal__name { margin-left: .4rem; font-family: var(--font-mono); font-size: .82rem; color: var(--muted-2); }
.terminal__body { padding: 1.1rem 1.2rem 1.3rem; font-family: var(--font-mono); font-size: .84rem; line-height: 1.9; }
.terminal__body p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-mut { color: var(--muted-2); } .c-acc { color: var(--accent); } .c-ok { color: #46d39a; } .c-warn { color: #ffb347; }
.spark { width: 100%; height: 60px; margin-top: 1rem; display: block; }
.spark rect { fill: rgba(43, 147, 240, .55); }
.spark .spark--hot { fill: #ffb347; }

/* ============================================================
   GitHub band
   ============================================================ */
.github {
    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 36px);
    flex-wrap: wrap;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(26px, 3.5vw, 44px);
}
.github__icon { flex: none; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: var(--grad-soft); border: 1px solid var(--border); color: var(--text); }
.github__icon svg { width: 32px; height: 32px; }
.github__copy { flex: 1 1 280px; }
.github__copy .eyebrow { margin-bottom: .5rem; }
.github__copy .section__title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.github__desc { color: var(--muted); margin: .6rem 0 0; }
.github .btn { flex: none; }

/* ============================================================
   Talks
   ============================================================ */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: clamp(24px, 3vw, 36px); }
.filter {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .9rem;
    color: var(--muted);
    background: rgba(255, 255, 255, .02);
    border: 1px solid var(--border);
    padding: .55em 1.1em;
    border-radius: 999px;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.filter:hover { color: var(--text); border-color: var(--border-str); }
.filter.is-active { color: var(--accent-ink); background: var(--accent); border-color: transparent; font-weight: 600; }

.talks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: clamp(14px, 2vw, 20px); }
.talk {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    transition: transform .2s ease, border-color .2s ease;
}
.talk:hover { transform: translateY(-3px); border-color: var(--border-str); }
.talk.is-hidden { display: none; }
.talk__top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.talk__event { font-family: var(--font-mono); font-size: .78rem; color: var(--accent); letter-spacing: .02em; }
.talk__cat {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .2em .7em;
    white-space: nowrap;
}
.talk__title { font-size: 1.02rem; font-weight: 600; line-height: 1.3; margin: 0; flex: 1; }
.talk__link { color: var(--accent-2); font-weight: 600; font-size: .9rem; font-family: var(--font-head); align-self: flex-start; transition: gap .2s; }
.talk__link:hover { text-decoration: underline; }
.talk__live { color: var(--muted-2); font-size: .85rem; font-style: italic; }

/* ============================================================
   Contact
   ============================================================ */
.contact {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(32px, 5vw, 64px);
}
.contact__head { max-width: 620px; margin-bottom: 2.4rem; }
.contact__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(14px, 2vw, 20px); }
.contact__item {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.4rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .02);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.contact__item:hover { transform: translateY(-3px); border-color: var(--accent); background: rgba(43, 147, 240, .08); }
.contact__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--grad-soft); color: var(--accent-2); margin-bottom: .5rem; }
.contact__icon svg { width: 22px; height: 22px; }
.contact__label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); }
.contact__value { font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; word-break: break-word; }

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: clamp(40px, 6vw, 64px) 0 32px; margin-top: 20px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 2rem; }
.footer__tag { color: var(--muted); margin: .5rem 0 0; max-width: 32em; font-size: .95rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.footer__links a { color: var(--muted); font-size: .95rem; transition: color .2s ease; }
.footer__links a:hover { color: var(--text); }
.footer__bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
    margin-top: 2.4rem; padding-top: 1.6rem;
    border-top: 1px solid var(--border);
    color: var(--muted-2); font-size: .86rem;
}
.footer__bottom p { margin: 0; }
.footer__meta { font-family: var(--font-mono); }

/* ============================================================
   Reveal animations
   ============================================================ */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
    will-change: opacity, transform;
}
.js [data-reveal].in-view { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__media { order: -1; }
    .portrait { width: min(280px, 70%); }
    .feature { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
    .nav__toggle { display: flex; }
    .lang__btn span { display: none; }
    .lang { gap: 0; }
    .nav__menu {
        position: fixed;
        inset: 72px 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: .25rem;
        padding: 1rem var(--gutter) 1.5rem;
        background: rgba(10, 15, 30, .96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, transform .25s ease, visibility .25s;
    }
    .nav__menu.is-open { opacity: 1; visibility: visible; transform: none; }
    .nav__menu a { padding: .8em 1em; font-size: 1.05rem; border-radius: 12px; }
    .nav__cta { margin-left: 0; text-align: center; margin-top: .4rem; }
    .footer__inner { flex-direction: column; }
}

@media (max-width: 480px) {
    .brand__name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
}
