/* ===== LOCAL INTER FONT ===== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 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;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 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: 400 900;
    font-display: swap;
    src: url('fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 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;
}

/* ===== DARK THEME (default) ===== */
:root, [data-theme="dark"] {
    --bg: #050507;
    --bg2: #0c0c10;
    --bg3: #131318;
    --text: #f0f0f5;
    --text2: #8b8b9e;
    --accent: #6c5ce7;
    --accent2: #a29bfe;
    --cyan: #00cec9;
    --orange: #fdcb6e;
    --pink: #fd79a8;
    --border: rgba(255,255,255,0.06);
    --glass: rgba(255,255,255,0.03);
    --radius: 16px;
    --shadow: rgba(0,0,0,0.3);
    --particle-color: 162,155,254;
    --noise-opacity: 0.035;
    --blueprint-opacity: 0;
    --cookie-bg: rgba(12,12,16,0.95);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
    --bg: #f5f5f7;
    --bg2: #ffffff;
    --bg3: #eeeef2;
    --text: #1a1a2e;
    --text2: #5a5a7a;
    --accent: #5b4cdb;
    --accent2: #7c6cf0;
    --cyan: #00a8a3;
    --orange: #e6a800;
    --pink: #e05690;
    --border: rgba(0,0,0,0.08);
    --glass: rgba(0,0,0,0.02);
    --shadow: rgba(0,0,0,0.08);
    --particle-color: 91,76,219;
    --noise-opacity: 0.02;
    --blueprint-opacity: 0.06;
    --cookie-bg: rgba(255,255,255,0.95);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    transition: background 0.4s, color 0.4s;
}

::selection { background: var(--accent); color: white; }

a { color: var(--accent2); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--cyan); }

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 12px var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(108,92,231,0.2);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: var(--text2);
    transition: fill 0.3s, transform 0.5s;
}

.theme-toggle:hover svg { fill: var(--accent2); }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--cyan), var(--pink));
    z-index: 10000;
    transition: width 0.05s linear;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px var(--accent), 0 0 20px rgba(108,92,231,0.3);
}

/* ===== NOISE OVERLAY ===== */
.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: var(--noise-opacity);
    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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    transition: opacity 0.4s;
}

/* ===== PARTICLES BG ===== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ===== SPOTLIGHT ===== */
.spotlight {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--particle-color),0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s;
}

/* ===== BLUEPRINT GRID (construction themed) ===== */
.blueprint-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: var(--blueprint-opacity);
    background-image:
        linear-gradient(rgba(var(--particle-color),0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--particle-color),0.3) 1px, transparent 1px),
        linear-gradient(rgba(var(--particle-color),0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--particle-color),0.15) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    transition: opacity 0.4s;
}

[data-theme="dark"] .blueprint-bg {
    opacity: 0.03;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 8s ease-in-out infinite;
    will-change: transform;
    transition: background 0.4s;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(108,92,231,0.15);
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(0,206,201,0.1);
    bottom: -100px;
    left: -150px;
    animation-delay: -3s;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(253,121,168,0.08);
    top: 30%;
    left: 50%;
    animation-delay: -5s;
}

[data-theme="light"] .hero-orb-1 { background: rgba(91,76,219,0.12); }
[data-theme="light"] .hero-orb-2 { background: rgba(0,168,163,0.10); }
[data-theme="light"] .hero-orb-3 { background: rgba(224,86,144,0.08); }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* Construction crane SVG decoration */
.hero-crane {
    position: absolute;
    right: 5%;
    bottom: 10%;
    width: 180px;
    height: auto;
    opacity: 0.06;
    pointer-events: none;
    transition: opacity 0.4s;
}

[data-theme="light"] .hero-crane { opacity: 0.08; }

.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 32px;
}

.avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid transparent;
    background-origin: border-box;
    background-clip: content-box, border-box;
    background-image: linear-gradient(var(--bg), var(--bg)), linear-gradient(135deg, var(--accent), var(--cyan));
    position: relative;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background-image 0.4s;
}

.avatar:hover {
    transform: scale(1.08) rotate(5deg);
}

.avatar-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(108,92,231,0.3), rgba(0,206,201,0.3)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ringPulse 3s ease-in-out infinite;
}

/* Avatar glow ring */
.avatar-wrap::after {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent), var(--cyan), var(--pink), var(--accent));
    opacity: 0.15;
    filter: blur(20px);
    animation: spinGlow 6s linear infinite;
    z-index: 0;
}

@keyframes spinGlow {
    to { transform: rotate(360deg); }
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
    overflow: hidden;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--accent2), var(--cyan), var(--pink));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}

/* Letter-by-letter animation */
.hero h1 .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px) rotateX(-40deg);
    background: linear-gradient(135deg, var(--accent2), var(--cyan), var(--pink));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: charReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards, gradientShift 4s ease-in-out infinite;
}

.hero h1 .char-space {
    display: inline-block;
    width: 0.25em;
}

@keyframes charReveal {
    to { opacity: 1; transform: translateY(0) rotateX(0); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.tagline {
    font-size: 1.15rem;
    color: var(--text2);
    font-weight: 500;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.8s forwards;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 1s forwards;
}

.hero-services {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 1.2s forwards;
}

.hero-service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--glass);
    border: 1px solid rgba(0,206,201,0.2);
    border-radius: 100px;
    color: var(--text2);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-service-link:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(0,206,201,0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,206,201,0.15);
}

.social {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.social:hover {
    border-color: var(--accent);
    background: rgba(108,92,231,0.15);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 25px rgba(108,92,231,0.2);
}

.social svg { width: 20px; height: 20px; fill: var(--text2); transition: fill 0.3s; }
.social:hover svg { fill: var(--accent2); }

.scroll-arrow {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text2);
    font-size: 1.2rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.scroll-arrow:hover { opacity: 1; }

/* ===== MARQUEE TICKER ===== */
.marquee-wrap {
    overflow: hidden;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg2);
    position: relative;
    z-index: 2;
    transition: background 0.4s, border-color 0.4s;
}

.marquee {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
    gap: 0;
}

.marquee:hover {
    animation-play-state: paused;
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 32px;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text2);
}

.marquee-item .sep {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

.marquee-item:nth-child(even) .sep { background: var(--cyan); }
.marquee-item:nth-child(3n) .sep { background: var(--pink); }

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== SECTIONS ===== */
section { padding: 100px 0; position: relative; z-index: 1; }

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 48px;
    color: var(--text);
    position: relative;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    border-radius: 2px;
    margin-right: 14px;
    vertical-align: middle;
}

/* ===== SECTION DIVIDER — construction ruler ===== */
.section-divider {
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--accent) 0px, var(--accent) 30px,
        transparent 30px, transparent 40px,
        var(--cyan) 40px, var(--cyan) 45px,
        transparent 45px, transparent 55px
    );
    opacity: 0.25;
    margin: 0 auto;
    max-width: 960px;
    padding: 0 24px;
}

/* ===== BIO ===== */
.bio {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background 0.4s, border-color 0.4s;
}

.bio-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.bio-text {
    color: var(--text2);
    font-size: 1.05rem;
    line-height: 1.8;
}

.bio-text strong { color: var(--text); font-weight: 600; }

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 14px;
    background: rgba(108,92,231,0.1);
    border: 1px solid rgba(108,92,231,0.2);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent2);
    transition: all 0.3s;
}

.skill-tag:hover {
    background: rgba(108,92,231,0.2);
    border-color: rgba(108,92,231,0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108,92,231,0.15);
}

.skill-tag.cyan {
    background: rgba(0,206,201,0.1);
    border-color: rgba(0,206,201,0.2);
    color: var(--cyan);
}

.skill-tag.cyan:hover {
    background: rgba(0,206,201,0.2);
    border-color: rgba(0,206,201,0.4);
    box-shadow: 0 4px 15px rgba(0,206,201,0.15);
}

/* ===== STATS ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 60px;
}

.stat-card {
    text-align: center;
    padding: 32px 20px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: conic-gradient(from var(--card-angle, 0deg), var(--accent), var(--cyan), var(--pink), var(--accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}

.stat-card:hover::before { opacity: 1; }

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent2), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    color: var(--text2);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 8px;
}

/* ===== BIOGRAPHY TIMELINE ===== */
.biography {
    background: var(--bg);
    position: relative;
    transition: background 0.4s;
}

.bio-intro {
    color: var(--text2);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 720px;
    margin-bottom: 48px;
}

.bio-intro strong { color: var(--text); font-weight: 600; }

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--cyan), var(--pink), var(--orange));
    border-radius: 1px;
}

.tl-block {
    position: relative;
    margin-bottom: 40px;
}

.tl-block:last-child { margin-bottom: 0; }

.tl-dot {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    background: var(--bg);
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tl-block:hover .tl-dot {
    transform: scale(1.3);
    box-shadow: 0 0 15px currentColor;
}

.tl-block:nth-child(2) .tl-dot { border-color: var(--cyan); }
.tl-block:nth-child(3) .tl-dot { border-color: var(--pink); }
.tl-block:nth-child(4) .tl-dot { border-color: var(--orange); }
.tl-block:nth-child(5) .tl-dot { border-color: var(--accent2); }

.tl-period {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.tl-block:nth-child(2) .tl-period { color: var(--cyan); }
.tl-block:nth-child(3) .tl-period { color: var(--pink); }
.tl-block:nth-child(4) .tl-period { color: var(--orange); }
.tl-block:nth-child(5) .tl-period { color: var(--accent2); }

.tl-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.tl-text {
    color: var(--text2);
    font-size: 0.92rem;
    line-height: 1.7;
}

.tl-text strong { color: var(--text); font-weight: 600; }

.tl-details {
    margin-top: 14px;
    padding-left: 0;
    list-style: none;
}

.tl-details li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
    color: var(--text2);
    font-size: 0.88rem;
    line-height: 1.6;
}

.tl-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}

.tl-block:nth-child(2) .tl-details li::before { background: var(--cyan); }
.tl-block:nth-child(3) .tl-details li::before { background: var(--pink); }
.tl-block:nth-child(4) .tl-details li::before { background: var(--orange); }
.tl-block:nth-child(5) .tl-details li::before { background: var(--accent2); }

.tl-details li strong { color: var(--text); font-weight: 600; }

.tl-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 16px;
    margin-bottom: 8px;
}

.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tl-tag {
    padding: 4px 10px;
    background: rgba(108,92,231,0.08);
    border: 1px solid rgba(108,92,231,0.15);
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent2);
}

.tl-block:nth-child(2) .tl-tag {
    background: rgba(0,206,201,0.08);
    border-color: rgba(0,206,201,0.15);
    color: var(--cyan);
}

.tl-block:nth-child(3) .tl-tag {
    background: rgba(253,121,168,0.08);
    border-color: rgba(253,121,168,0.15);
    color: var(--pink);
}

.tl-block:nth-child(4) .tl-tag {
    background: rgba(253,203,110,0.08);
    border-color: rgba(253,203,110,0.15);
    color: var(--orange);
}

/* Trust section */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 48px;
}

.trust-card {
    padding: 24px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.trust-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: conic-gradient(from var(--card-angle, 0deg), var(--accent), var(--cyan), var(--pink), var(--accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}

.trust-card:hover::before { opacity: 1; }

.trust-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px var(--shadow);
}

.trust-icon {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.trust-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.trust-card p {
    font-size: 0.8rem;
    color: var(--text2);
    line-height: 1.5;
}

/* ===== PROJECTS GRID ===== */
.projects {
    position: relative;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    padding: 32px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 800px;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    opacity: 0;
    transition: opacity 0.3s;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(var(--particle-color),0.08), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 1; }

.card:hover {
    border-color: rgba(108,92,231,0.3);
    background: var(--bg3);
    box-shadow: 0 16px 40px var(--shadow), 0 0 30px rgba(108,92,231,0.08);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 1.4rem;
}

.card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.card p {
    color: var(--text2);
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 18px;
    line-height: 1.6;
}

.card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.card-link:hover { gap: 10px; color: var(--cyan); }

/* ===== CONSULTATIONS ===== */
.consultations { padding: 80px 0; }

.consult-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.consult-card {
    padding: 32px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.consult-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.consult-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow);
    border-color: rgba(108,92,231,0.2);
}

.consult-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.consult-card ul {
    list-style: none;
    margin-bottom: 16px;
}

.consult-card ul li {
    color: var(--text2);
    font-size: 0.9rem;
    line-height: 1.8;
    padding-left: 18px;
    position: relative;
}

.consult-card ul li::before {
    content: '\2022';
    color: var(--accent2);
    position: absolute;
    left: 0;
}

.consult-card .consult-note {
    font-size: 0.85rem;
    color: var(--text2);
    font-style: italic;
}

.consult-cta {
    text-align: center;
    margin-top: 32px;
}

.consult-cta p {
    color: var(--text2);
    font-size: 1rem;
    margin-bottom: 20px;
}

.consult-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.consult-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.consult-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s;
}

.consult-btn:hover::after { left: 125%; }

.consult-btn.telegram {
    background: linear-gradient(135deg, #2AABEE, #229ED9);
    color: white;
}

.consult-btn.telegram:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(42,171,238,0.35);
    color: white;
}

.consult-btn.max {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: white;
}

.consult-btn.max:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(108,92,231,0.35);
    color: white;
}

@media (max-width: 768px) {
    .consult-grid { grid-template-columns: 1fr; }
}

/* ===== CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 40px;
}

.contact-card {
    padding: 28px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.contact-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(var(--particle-color),0.06), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.contact-card:hover::after { opacity: 1; }

.contact-card:hover {
    border-color: rgba(108,92,231,0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow);
}

.contact-card .label { color: var(--text2); font-size: 0.85rem; margin-bottom: 8px; }
.contact-card .value { font-weight: 600; font-size: 1rem; }
.contact-card .value a { color: var(--text); }
.contact-card .value a:hover { color: var(--accent2); }

.qr-section {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.qr-block { text-align: center; }

.qr-block img {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    background: white;
    padding: 8px;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qr-block img:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 10px 30px var(--shadow);
}

.qr-block p {
    color: var(--text2);
    font-size: 0.85rem;
    margin-top: 10px;
    font-weight: 500;
}

/* ===== FOOTER ===== */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text2);
    position: relative;
    z-index: 1;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.footer-links a { color: var(--text2); font-size: 0.85rem; }
.footer-links a:hover { color: var(--accent2); }

/* ===== COOKIE ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cookie-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    justify-content: center;
    z-index: 1000;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: background 0.4s;
}

.cookie-inner {
    max-width: 960px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cookie-inner p { color: var(--text2); font-size: 0.85rem; margin: 0; flex: 1; min-width: 200px; }

.cookie-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--accent), #7c6cf0);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.3s;
}

.cookie-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(108,92,231,0.4); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 12px var(--shadow);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(108,92,231,0.2);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    fill: var(--text2);
    transition: fill 0.3s;
}

.back-to-top:hover svg { fill: var(--accent2); }

/* ===== TYPING ANIMATION ===== */
.tagline .typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.15em;
    background: var(--accent2);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ===== SVG DRAW ON SCROLL ===== */
.hero-crane line,
.hero-crane rect {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawLine 3s ease-out forwards;
}

.hero-crane line:nth-child(2) { animation-delay: 0.1s; }
.hero-crane line:nth-child(3) { animation-delay: 0.2s; }
.hero-crane line:nth-child(4) { animation-delay: 0.3s; }
.hero-crane line:nth-child(5) { animation-delay: 0.4s; }
.hero-crane line:nth-child(6) { animation-delay: 0.5s; }
.hero-crane line:nth-child(7) { animation-delay: 0.6s; }
.hero-crane line:nth-child(8) { animation-delay: 0.7s; }
.hero-crane line:nth-child(9) { animation-delay: 0.8s; }
.hero-crane line:nth-child(10) { animation-delay: 0.9s; }
.hero-crane line:nth-child(11) { animation-delay: 1.0s; }
.hero-crane rect:nth-child(12) { animation-delay: 1.1s; }
.hero-crane line:nth-child(13) { animation-delay: 1.2s; }
.hero-crane line:nth-child(14) { animation-delay: 1.3s; }
.hero-crane line:nth-child(15) { animation-delay: 1.4s; }
.hero-crane line:nth-child(16) { animation-delay: 1.5s; }
.hero-crane rect:nth-child(18) { animation-delay: 1.6s; }
.hero-crane line:nth-child(20) { animation-delay: 1.7s; }
.hero-crane line:nth-child(21) { animation-delay: 1.8s; }
.hero-crane line:nth-child(22) { animation-delay: 1.9s; }

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

/* ===== BENTO GRID for projects ===== */
@media (min-width: 769px) {
    .grid.bento {
        grid-template-columns: repeat(3, 1fr);
    }
    .grid.bento .card:first-child {
        grid-column: span 2;
    }
    .grid.bento .card:nth-child(5) {
        grid-column: span 2;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    section { padding: 70px 0; }
    .bio-content { grid-template-columns: 1fr; gap: 32px; }
    .stats { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .grid { grid-template-columns: 1fr; }
    .socials { gap: 8px; }
    .qr-section { gap: 24px; }
    .stat-number { font-size: 2rem; }
    .trust-grid { grid-template-columns: 1fr 1fr; }
    .timeline { padding-left: 24px; }
    .tl-dot { left: -24px; width: 14px; height: 14px; }
    .hero-crane { display: none; }
    .theme-toggle { top: 12px; right: 12px; width: 40px; height: 40px; }
    .hero h1 { font-size: clamp(2rem, 10vw, 3rem); }
    .avatar { width: 100px; height: 100px; }
    .avatar-wrap::after { inset: -14px; }
    .hero-service-link {
        font-size: 0.8rem;
        padding: 8px 16px;
        text-align: center;
    }
    .section-title { font-size: 1.5rem; }
    .consult-btn { width: 100%; justify-content: center; }
    .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
    .marquee-item { padding: 0 20px; font-size: 0.8rem; }
    .spotlight { display: none; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .trust-grid { grid-template-columns: 1fr; }
    .hero-services { gap: 8px; }
    .hero-service-link { font-size: 0.75rem; padding: 8px 14px; gap: 6px; }
    .socials { gap: 6px; }
    .social { width: 40px; height: 40px; }
    .social svg { width: 18px; height: 18px; }
    .qr-block img { width: 120px; height: 120px; }
    .cookie-inner { flex-direction: column; text-align: center; }
    .cookie-btn { width: 100%; }
    .stat-card { padding: 24px 16px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero-orb { animation: none; }
    .avatar-wrap::after { animation: none; }
    .avatar-ring { animation: none; }
    .marquee { animation: none; }
    .scroll-arrow { animation: none; }
    .hero h1 .char {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .tagline, .socials, .hero-services {
        opacity: 1;
        animation: none;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    #particles { display: none; }
}

/* ===== AUTO COLOR SCHEME (no saved preference) ===== */
@media (prefers-color-scheme: light) {
    [data-theme="auto"] {
        --bg: #f5f5f7;
        --bg2: #ffffff;
        --bg3: #eeeef2;
        --text: #1a1a2e;
        --text2: #5a5a7a;
        --accent: #5b4cdb;
        --accent2: #7c6cf0;
        --cyan: #00a8a3;
        --orange: #e6a800;
        --pink: #e05690;
        --border: rgba(0,0,0,0.08);
        --glass: rgba(0,0,0,0.02);
        --shadow: rgba(0,0,0,0.08);
        --particle-color: 91,76,219;
        --noise-opacity: 0.02;
        --blueprint-opacity: 0.06;
        --cookie-bg: rgba(255,255,255,0.95);
    }
}
