:root {
    --bg: #0a0a0f;
    --bg-soft: #12121a;
    --bg-card: #15151f;
    --text: #ececf1;
    --text-dim: #8b8b9a;
    --line: #24242f;
    --accent: #7c5cff;
    --radius: 16px;
    --maxw: 1080px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* radial glow backdrop */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(
            60rem 60rem at 75% -10%,
            rgba(124, 92, 255, 0.18),
            transparent 60%
        ),
        radial-gradient(
            50rem 50rem at 0% 100%,
            rgba(0, 200, 180, 0.1),
            transparent 55%
        );
    pointer-events: none;
    z-index: 0;
}

main,
.footer {
    position: relative;
    z-index: 1;
}
.nav {
    position: sticky;
    z-index: 10;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- NAV ---------- */
.nav {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem clamp(1.25rem, 5vw, 3rem);
    backdrop-filter: blur(12px);
    background: rgba(10, 10, 15, 0.92);
    border-bottom: 1px solid transparent;
    transition:
        border-color 0.3s ease,
        background 0.3s ease;
}
.nav--scrolled {
    border-color: var(--line);
}
.nav__brand {
    display: flex;
    align-items: center;
}
.nav__brand img {
    height: 32px;
    width: 32px;
}
.nav__links {
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    list-style: none;
}
.nav__links a {
    font-size: 0.9rem;
    color: var(--text-dim);
    transition: color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
    .nav__links a:hover {
        color: var(--text);
    }
}
.lang-toggle {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition:
        border-color 0.2s,
        color 0.2s;
}
.lang-toggle:hover {
    border-color: var(--accent);
    color: var(--text);
}

/* ---------- HERO ---------- */
.hero {
    display: grid;
    place-items: center;
    padding: clamp(3rem, 12vh, 7rem) 1.25rem clamp(2rem, 6vh, 4rem);
    text-align: center;
}
.hero__inner {
    display: grid;
    place-items: center;
    gap: 1.25rem;
    max-width: 640px;
}
.hero__avatar {
    width: clamp(160px, 40vw, 220px);
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent), #00c8b4);
    box-shadow: 0 0 60px rgba(124, 92, 255, 0.35);
    animation: float 6s ease-in-out infinite;
}
.hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: 3px solid var(--bg);
}
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero__name {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.4rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
}
.hero__tagline {
    color: var(--text-dim);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.hero__social {
    display: flex;
    gap: 0.75rem;
    list-style: none;
    margin-top: 0.5rem;
}
.hero__social a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--text-dim);
    transition:
        transform 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}
.hero__social a:hover {
    color: var(--text);
    border-color: var(--accent);
    transform: translateY(-3px);
}
.hero__social svg {
    width: 18px;
    height: 18px;
}

/* ---------- SECTIONS ---------- */
.work,
.contact {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(2rem, 8vh, 5rem) clamp(1.25rem, 5vw, 2rem);
}
.section__title {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 600;
    margin-bottom: 1.75rem;
    letter-spacing: -0.01em;
}
.section__title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 0.6rem;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.section__sub {
    font-size: 0.85rem;
    color: var(--muted, #888);
    margin-top: -1.25rem;
    margin-bottom: 1.75rem;
    letter-spacing: 0.01em;
}

/* ---------- FILTERS ---------- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}
.filter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}
.filter:hover {
    color: var(--text);
}
.filter svg,
.filter img {
    height: 16px;
    width: auto;
    filter: invert(1);
    mix-blend-mode: screen;
}
.filter--active {
    color: var(--text);
    border-color: currentColor;
    background: var(--bg-card);
}

/* ---------- GRID ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.1rem;
}
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-card), var(--bg-soft));
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    animation: rise 0.5s ease forwards;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}
.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--brand, var(--accent));
}
@keyframes rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card__logo {
    height: 60px;
    max-width: 120px;
}
.card__logo svg,
.card__logo img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    filter: invert(1);
    mix-blend-mode: screen;
}
.card__logo img[data-colorlogo],
.filter img[data-colorlogo] {
    filter: none;
    mix-blend-mode: normal;
}
.card__role {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
}
.card__desc {
    color: var(--text-dim);
    font-size: 0.92rem;
}
.card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}
.tag {
    font-size: 0.72rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--text-dim);
}

/* ---------- APPS ---------- */
.apps {
    padding: 4rem 1.25rem;
    max-width: 900px;
    margin-inline: auto;
}
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.1rem;
}
.app-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-card);
    overflow: hidden;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}
.app-card:hover {
    transform: translateY(-4px);
    border-color: var(--app-color, var(--accent));
}
.app-card__screenshot {
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: var(--bg-soft);
}
.app-card__screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: transform 0.4s ease;
}
.app-card:hover .app-card__screenshot img {
    transform: scale(1.03);
}
.app-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.1rem 1.1rem;
    border-top: 2px solid var(--app-color, var(--accent));
    flex: 1;
}
.app-card__desc {
    flex: 1;
    color: var(--text-dim);
    font-size: 0.82rem;
}
.app-card__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.app-card__icon {
    font-size: 1.2rem;
}
.app-card__name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    font-weight: 600;
}
.app-card__tag {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    align-self: flex-start;
    color: var(--app-color, var(--accent));
    border: 1px solid
        color-mix(in srgb, var(--app-color, var(--accent)) 40%, transparent);
    background: color-mix(
        in srgb,
        var(--app-color, var(--accent)) 10%,
        transparent
    );
}

.app-card__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem 1rem;
    border-top: 1px solid var(--line);
}
.app-card__appstore-btn {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}
.app-card__appstore-btn img {
    height: 40px;
    width: auto;
    display: block;
}
.app-card__appstore-btn:hover {
    opacity: 0.85;
}
.app-card__web-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.75rem;
    height: 40px;
    box-sizing: border-box;
    background: #000;
    border-radius: 8px;
    border: 1px solid #a6a6a6;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}
.app-card__web-btn:hover {
    opacity: 0.85;
}
.app-card__web-btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.app-card__web-btn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.app-card__web-btn-text small {
    font-size: 0.48rem;
    letter-spacing: 0.03em;
    font-weight: 400;
}
.app-card__web-btn-text {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    white-space: nowrap;
}

/* ---------- FOOTER ---------- */
.footer {
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
    margin-top: 2rem;
}
.footer__inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
    margin-inline: auto;
    padding: 3rem 1.25rem 2rem;
}
.footer__logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.6rem;
}
.footer__logo img {
    height: 52px;
    width: auto;
}
.footer__tagline {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.5;
}
.footer__heading {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}
.footer__nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer__nav a {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}
.footer__nav a:hover {
    color: var(--text);
}
.footer__contact {
    display: flex;
    flex-direction: column;
}
.footer__social {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    list-style: none;
}
.footer__social a {
    color: var(--text-dim);
    display: flex;
    transition: color 0.2s;
}
.footer__social a:hover {
    color: var(--text);
}
.footer__social svg {
    width: 18px;
    height: 18px;
}
.footer__mail {
    color: var(--accent);
    font-size: 0.85rem;
    text-decoration: none;
    transition: opacity 0.2s;
}
.footer__mail:hover {
    opacity: 0.75;
}
.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin-inline: auto;
    padding: 1rem 1.25rem 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--text-dim);
    font-size: 0.78rem;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(5, 5, 9, 0.85);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.lightbox--open {
    opacity: 1;
    pointer-events: auto;
}
.lightbox__panel {
    width: min(560px, 100%);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 5vw, 2.5rem);
    transform: scale(0.96);
    transition: transform 0.25s ease;
}
.lightbox--open .lightbox__panel {
    transform: scale(1);
}
.lightbox__panel .card__logo {
    height: 60px;
    max-width: 160px;
    margin-bottom: 1rem;
}
.lightbox__panel h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}
.lightbox__panel .lb__period {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.lightbox__panel ul {
    list-style: none;
    display: grid;
    gap: 0.6rem;
}
.lightbox__panel li {
    color: var(--text-dim);
    padding-left: 1.2rem;
    position: relative;
}
.lightbox__panel li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
}
.lightbox__close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.lightbox__close:hover {
    border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        scroll-behavior: auto;
    }
    .card {
        opacity: 1;
        transform: none;
    }
}
