/* ============================================================
   Dala visual system — void-black canvas, single violet accent,
   amber emphasis, scale-driven weight-400 typography.
   Loaded AFTER style.css: overrides tokens first, components second.
   ============================================================ */

/* ------------------------------------------------------------
   Inter, self-hosted. Previously two render-blocking hops through
   fonts.googleapis.com → fonts.gstatic.com before the first letter could
   paint. The old "the visitor already has Inter cached from another site"
   argument died when browsers partitioned the HTTP cache by top-level site,
   so self-hosting is now strictly better.

   These are variable fonts: one file per subset spans the whole 100–900 axis,
   which is why there is no separate file per weight and why body copy can keep
   using weight 300 (see `body` below) at no extra cost.

   Subsets are latin, cyrillic and cyrillic-ext. The browser fetches a file only
   when a character on the page falls inside its unicode-range, so an English
   page pays for latin alone. cyrillic-ext is here for exactly one character —
   ₴ (U+20B4), used in two case studies. latin-ext also covers ₴ but is 85 KB
   against cyrillic-ext's 26 KB, so it is deliberately absent; the cost is that
   Latin diacritics outside Latin-1 (ł, ő, ș …) would fall back to the system
   font if they ever appear in content. Add latin-ext here if that happens.
   ------------------------------------------------------------ */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

:root {
    /* Palette */
    --bg: #000000;
    --surface: #000000;
    --surface-elevated: #000000;
    --surface-glass: rgba(0, 0, 0, 0);
    --primary: #8052ff;                 /* Electric Iris — the only filled-CTA color */
    --primary-bright: #9d7bff;          /* brighter tint for glows/emphasis */
    --primary-glow: rgba(128, 82, 255, 0.55);
    --accent: #ffb829;                  /* Saffron Spark — emphasis + links */
    --accent-secondary: #15846e;
    --text: #ffffff;
    --text-muted: #9a9a9a;
    --gradient-primary: linear-gradient(135deg, #8052ff, #15846e);

    --font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --radius: 24px;
    --radius-lg: 24px;
    --radius-xl: 24px;

    /* Dala type scale (compact hero per feedback) */
    --dala-display: clamp(32px, 5vw, 60px);
    --dala-heading: clamp(28px, 4vw, 44px);
    --dala-body: 17px;
}

body {
    background: #000000;
    color: var(--text);
    font-weight: 300;
    font-size: var(--dala-body);
}

/* ---------- Typography: scale, not weight ---------- */

h1, h2, h3, h4, .section-title, .hero__title {
    font-weight: 400;
}

.hero__title {
    font-size: var(--dala-display);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-title {
    font-size: var(--dala-heading);
    letter-spacing: -0.03em;
}

.hero__subtitle,
.section-subtitle,
p {
    font-weight: 300;
    color: #bdbdbd;
}

.hero__subtitle { font-size: 16px; max-width: 520px; }

/* Gradient text → solid white; accent goes to the first hero line only */
.text-gradient {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
    color: #ffffff;
}

.hero__title .text-gradient {
    color: var(--primary-bright);
    text-shadow: 0 0 42px rgba(128, 82, 255, 0.65);
}

/* ---------- Void surfaces: kill glass, borders, shadows ---------- */

.card, .glass-card,
.project-card, .skill-category, .service-card,
.timeline-content, .process-step {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 24px;
}

.card:hover, .glass-card:hover,
.project-card:hover, .skill-category:hover, .service-card:hover {
    border-color: rgba(157, 123, 255, 0.7);
    box-shadow: 0 0 32px rgba(128, 82, 255, 0.16);
    transform: none;
}

section, .hero, .about, .skills, .projects, .experience, .services, .contact {
    background: #000000;
}

/* Generous Dala section rhythm */
.about, .skills, .projects, .experience, .services, .contact {
    padding-top: 90px;
    padding-bottom: 90px;
}

.hero__bg, .hero__float { display: none; }

/* Ambient violet glow behind the hero content */
.hero::before {
    content: "";
    position: absolute;
    top: 8%;
    left: -12%;
    width: 55vw;
    height: 55vw;
    max-width: 780px;
    max-height: 780px;
    background: radial-gradient(circle,
        rgba(128, 82, 255, 0.22) 0%,
        rgba(128, 82, 255, 0.08) 45%,
        transparent 70%);
    filter: blur(20px);
    pointer-events: none;
    z-index: 0;
}

/* ---------- Buttons: sharp violet CTA + ghost secondary ---------- */

.btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.75rem 1.4rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--primary {
    background: linear-gradient(135deg, #9d7bff 0%, #8052ff 45%, #6b3fe8 100%);
    color: #ffffff;
    border: 1px solid rgba(157, 123, 255, 0.6);
    box-shadow: 0 0 22px rgba(128, 82, 255, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn--primary:hover {
    background: linear-gradient(135deg, #ab8dff 0%, #8d63ff 45%, #7a4cf5 100%);
    box-shadow: 0 0 38px var(--primary-glow),
                0 4px 18px rgba(128, 82, 255, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transform: none;
}

.btn--secondary {
    background: rgba(128, 82, 255, 0.06);
    color: #ffffff;
    border: 1px solid rgba(157, 123, 255, 0.35);
    box-shadow: none;
}

.btn--secondary:hover {
    border-color: var(--primary-bright);
    background: rgba(128, 82, 255, 0.14);
    color: #ffffff;
    box-shadow: 0 0 24px rgba(128, 82, 255, 0.3);
    transform: none;
}

/* ---------- Navigation ---------- */

.nav {
    background: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: none;
}

.nav__logo {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.nav__link {
    color: #9a9a9a;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.nav__link:hover { color: #ffffff; }

.nav__link--active { color: #ffffff; }

.nav__link--active::after {
    content: "";
    display: block;
    height: 2px;
    margin-top: 4px;
    background: var(--primary-bright);
    border-radius: 1px;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ---------- Tags / chips ---------- */

.tag, .tech-tag {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #bdbdbd;
    border-radius: 9999px;
    box-shadow: none;
}

/* ---------- Project cards: title/image link into the case study ---------- */

.project-card__link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-card__link:hover { color: var(--primary-bright); }

.project-card__image a { display: block; }

/* ---------- FAQ (Services) ---------- */

.faq {
    max-width: 780px;
    margin: 5rem auto 0;
}

.faq__title {
    font-size: var(--dala-heading);
    font-weight: 400;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 2rem;
}

.faq__list {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.faq__item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq__question {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0.25rem;
    font-size: 17px;
    font-weight: 400;
    color: #ffffff;
    transition: color 0.2s ease;
}

.faq__question::-webkit-details-marker { display: none; }

.faq__question::after {
    content: "+";
    flex-shrink: 0;
    font-size: 20px;
    line-height: 1;
    color: var(--primary-bright);
    transition: transform 0.2s ease;
}

.faq__item[open] .faq__question::after {
    content: "−";
}

.faq__question:hover { color: var(--accent); }

.faq__answer {
    padding: 0 0.25rem 1.4rem;
}

.faq__answer p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    color: #bdbdbd;
    max-width: 68ch;
}

@media (max-width: 768px) {
    .faq { margin-top: 3rem; }
    .faq__question { font-size: 16px; }
    .faq__answer p { font-size: 15px; }
}

/* ---------- Stats ---------- */

.stat__number {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
    color: var(--primary-bright);
    font-weight: 400;
    text-shadow: 0 0 26px rgba(128, 82, 255, 0.55);
}

.stat__label {
    color: #9a9a9a;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

/* ---------- Timeline ---------- */

.timeline-dot {
    background: var(--primary-bright);
    box-shadow: 0 0 16px var(--primary-glow), 0 0 34px rgba(128, 82, 255, 0.3);
}

.timeline-period div:last-child { color: var(--accent); }

/* ---------- Links & accents ---------- */

a { color: inherit; }

.footer a:hover,
.contact-item__content a:hover { color: var(--accent); }

.about__email, .contact-item__content span { color: #9a9a9a; }

/* ---------- Footer ---------- */

.footer {
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__logo {
    color: #ffffff;
}

/* ---------- Forms ---------- */

.form-group input,
.form-group select,
.form-group textarea {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-radius: 12px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(128, 82, 255, 0.2);
    outline: none;
}

.form-group select option { background: #000000; color: #ffffff; }

/* ---------- Focus visibility (WCAG) ---------- */

a:focus-visible, button:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* ---------- Particle hero canvas ---------- */

.hero { position: relative; overflow: hidden; }

#heroParticles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

/* ---------- Icons: darker, muted ---------- */

.service-card__icon,
.skill-category__icon,
.process-step__icon,
.contact-item__icon {
    background: rgba(128, 82, 255, 0.10);
    border: 1px solid rgba(128, 82, 255, 0.25);
    box-shadow: none;
    color: #b8a5f5;
}

.service-card__icon {
    filter: saturate(0.55) brightness(0.8);
}

.skill-category__icon svg,
.process-step__icon svg,
.contact-item__icon svg {
    stroke: #b8a5f5;
    opacity: 0.85;
}

/* ---------- Floating contact button: dim violet ---------- */

.floating-contact-btn {
    background: rgba(30, 18, 66, 0.92);
    border: 1px solid rgba(128, 82, 255, 0.45);
    box-shadow: 0 0 18px rgba(128, 82, 255, 0.25);
    color: #cbb8ff;
}

.floating-contact-btn:hover {
    background: rgba(48, 30, 100, 0.95);
    border-color: var(--primary-bright);
    box-shadow: 0 0 26px rgba(128, 82, 255, 0.4);
    transform: none;
}

/* ---------- Language switcher ---------- */

.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    overflow: hidden;
}

.lang-switch a {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #9a9a9a;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lang-switch a:hover { color: #ffffff; }

.lang-switch a.lang-switch__active {
    color: #ffffff;
    background: rgba(128, 82, 255, 0.3);
}

/* ---------- Footer: 2-column link groups ---------- */

.footer__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

/* ---------- Mobile menu: re-skin only (base keeps its slide animation) ---------- */

@media (max-width: 767px) {
    /* Opaque void instead of the translucent navy gradient — no see-through. */
    .nav__links {
        background: #000000 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Kill the pulsing radial glow layer behind the menu. */
    .nav__links::before { display: none !important; }

    .nav__links .nav__link {
        font-size: 20px !important;
        font-weight: 400;
        letter-spacing: 0.08em;
        color: #ffffff;
        padding: 12px 24px;
        min-width: 220px;
        text-align: center;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 0;
    }

    .nav__links .nav__link:hover {
        background: none;
        box-shadow: none;
        transform: none;
        color: var(--primary-bright);
    }

    .nav__links .nav__link--active { color: var(--primary-bright); }

    body.nav-open { overflow: hidden; }
}

/* ---------- Mobile polish ---------- */

@media (max-width: 768px) {
    :root {
        --dala-display: clamp(28px, 8.5vw, 40px);
        --dala-heading: clamp(24px, 6.5vw, 32px);
    }

    .hero__subtitle { font-size: 15px; }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        max-width: 340px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .about, .skills, .projects, .experience, .services, .contact {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .section-header { margin-bottom: 28px; }

    .hero::before { width: 90vw; height: 90vw; left: -25%; }
}

@media (max-width: 400px) {
    :root { --dala-display: clamp(24px, 8vw, 32px); }
    .btn { font-size: 11px; padding: 0.7rem 1.1rem; }
}

/* ---------- Scrollbar ---------- */

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 8px;
}

::-webkit-scrollbar-track { background: #000000; }

/* ------------------------------------------------------------
   Consent banner — folded in from consent.css.

   It was a third render-blocking stylesheet for 573 B on the wire. Appended at the tail,
   so its cascade position is unchanged: it was always the last sheet to load.
   ------------------------------------------------------------ */

/* ============================================================
   Consent banner — bottom sheet on the Dala canvas.

   Shown by .consent-ask on <html>, which the <head> inline script sets when no choice is
   stored yet. Revealing it from consent.js at DOMContentLoaded instead meant a ~120px opaque
   panel slid into the viewport after first paint on every visit with cleared storage — i.e. on
   every Lighthouse run — which Speed Index charges for. Deciding it in <head> also beats
   deciding it on the server: public HTML is output-cached for an hour and shared between
   visitors.

   Hidden by default rather than shown by default, so a visitor with JavaScript off (who is
   therefore loading no analytics at all) does not get a banner they cannot dismiss.

   No CLS either way — the banner is position: fixed.
   ============================================================ */

.consent {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: 560px;
    margin-left: auto;
    padding: 1.35rem 1.5rem;
    background: rgba(6, 6, 10, 0.97);
    border: 1px solid rgba(157, 123, 255, 0.35);
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7), 0 0 32px rgba(128, 82, 255, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.consent-ask .consent { display: block; }

.consent__title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.consent__text {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.55;
    color: #bdbdbd;
    margin-bottom: 1.15rem;
}

.consent__text a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.consent__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
}

/* Footer opt-out link */

.consent-reopen {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.consent-reopen:hover { color: var(--accent); }

@media (max-width: 520px) {
    .consent {
        left: 0.6rem;
        right: 0.6rem;
        bottom: 0.6rem;
        padding: 1.15rem 1.15rem;
    }

    .consent__actions { flex-direction: column; }

    .consent__actions .btn { width: 100%; }
}
