/* ============================================
   Мифтахов.IT — тёмная tech-тема
   ============================================ */

:root {
    --bg: #0a0e17;
    --bg-2: #0d1320;
    --bg-3: #111a2b;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --text: #eef2f7;
    --text-muted: #9aa6b8;
    --text-dim: #66738a;

    --accent: #4de3c1;
    --accent-2: #5b9dff;
    --accent-soft: rgba(77, 227, 193, 0.12);
    --accent-glow: rgba(77, 227, 193, 0.35);

    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --radius: 18px;
    --radius-sm: 12px;
    --container: 1200px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --header-h: 76px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    display: block;
    max-width: 100%;
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

::selection {
    background: var(--accent);
    color: #04120f;
}

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

/* ---------- Фоновая графика ---------- */

.bg-fx {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-grid {
    position: absolute;
    inset: -10%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 75%);
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.5;
    animation: glowDrift 24s ease-in-out infinite alternate;
}

.bg-glow--1 {
    width: 60vw;
    height: 60vw;
    max-width: 900px;
    max-height: 900px;
    top: -25vw;
    right: -15vw;
    background: radial-gradient(circle, rgba(77, 227, 193, 0.22), transparent 65%);
}

.bg-glow--2 {
    width: 55vw;
    height: 55vw;
    max-width: 800px;
    max-height: 800px;
    top: 40vh;
    left: -22vw;
    background: radial-gradient(circle, rgba(91, 157, 255, 0.16), transparent 65%);
    animation-delay: -10s;
}

.bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes glowDrift {
    to {
        transform: translate3d(-4vw, 6vh, 0) scale(1.12);
    }
}

/* ---------- Прогресс прокрутки ---------- */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 1200;
    box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------- Хедер ---------- */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-h);
    display: flex;
    align-items: center;
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(10, 14, 23, 0.72);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom-color: var(--border);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #04120f;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 24px rgba(77, 227, 193, 0.35);
}

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

.nav {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.nav-link {
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.25s, background 0.25s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.nav-link.active {
    color: var(--text);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 11px;
}

.nav-toggle span {
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.35s var(--ease), opacity 0.25s;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Кнопки ---------- */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 500;
    letter-spacing: 0.005em;
    white-space: nowrap;
    overflow: hidden;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, border-color 0.3s, color 0.3s;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.35s var(--ease);
}

.btn:hover svg {
    transform: translateX(3px);
}

.btn-primary {
    color: #04120f;
    background: linear-gradient(120deg, var(--accent) 0%, #7ff5db 50%, var(--accent-2) 120%);
    background-size: 160% 100%;
    background-position: 0% 50%;
    box-shadow: 0 8px 30px -8px rgba(77, 227, 193, 0.55);
}

.btn-primary:hover {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: 0 14px 40px -8px rgba(77, 227, 193, 0.65);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
    transform: translateX(-120%);
}

.btn-primary:hover::after {
    animation: shine 0.9s var(--ease);
}

@keyframes shine {
    to {
        transform: translateX(120%);
    }
}

.btn-outline {
    color: var(--text);
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.02);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-2px);
}

.btn-ghost {
    padding: 10px 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border-strong);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-full {
    width: 100%;
}

/* ---------- Главный экран ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + 56px) 0 80px;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(40px, 6vw, 90px);
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 var(--accent-glow);
    animation: pulse 2.4s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(77, 227, 193, 0.55);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(77, 227, 193, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(77, 227, 193, 0);
    }
}

.hero-title {
    margin: 22px 0 18px;
    font-family: var(--font-display);
    font-size: clamp(2.7rem, 6.2vw, 5rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.035em;
    background: linear-gradient(180deg, #ffffff 30%, #8fa3bd 110%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-role {
    max-width: 620px;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.1vw, 1.6rem);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--text);
}

.grad-text {
    background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    max-width: 560px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
}

.tag {
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    transition: border-color 0.3s, color 0.3s, transform 0.3s var(--ease);
}

.tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Портрет */

.hero-visual {
    position: relative;
    justify-self: center;
    width: 100%;
    max-width: 420px;
}

.portrait-frame {
    position: relative;
    border-radius: 26px;
    padding: 10px;
    background: linear-gradient(160deg, rgba(77, 227, 193, 0.35), rgba(91, 157, 255, 0.12) 40%, rgba(255, 255, 255, 0.04) 70%);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 0 60px -20px rgba(77, 227, 193, 0.25);
    animation: floatY 8s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.portrait-frame .photo-slot {
    border-radius: 18px;
}

.portrait-scanline {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 10px;
    height: 40%;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(180deg, transparent, rgba(77, 227, 193, 0.14), transparent);
    z-index: 3;
    pointer-events: none;
    animation: scan 6s ease-in-out infinite;
}

@keyframes scan {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.8;
    }
    50% {
        transform: translateY(150%);
        opacity: 0.3;
    }
}

.portrait-corner {
    position: absolute;
    width: 26px;
    height: 26px;
    border: 2px solid var(--accent);
    z-index: 4;
    pointer-events: none;
}

.portrait-corner--tl {
    top: -2px;
    left: -2px;
    border-right: 0;
    border-bottom: 0;
    border-radius: 8px 0 0 0;
}

.portrait-corner--br {
    bottom: -2px;
    right: -2px;
    border-left: 0;
    border-top: 0;
    border-radius: 0 0 8px 0;
}

.float-card {
    position: absolute;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(13, 19, 32, 0.75);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.9);
}

.float-card--a {
    top: 14%;
    left: -34px;
    animation: floatY 6s ease-in-out infinite;
}

.float-card--b {
    bottom: 12%;
    right: -28px;
    animation: floatY 7s ease-in-out infinite reverse;
}

.float-card-label {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.float-card-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
}

.dot-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: blink 1.8s infinite;
}

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

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.scroll-line {
    position: relative;
    width: 1px;
    height: 46px;
    overflow: hidden;
    background: var(--border);
}

.scroll-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    animation: scrollLine 2.2s var(--ease) infinite;
}

@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }
    60%, 100% {
        transform: translateY(100%);
    }
}

/* ---------- Бегущая строка ---------- */

.marquee {
    overflow: hidden;
    border-block: 1px solid var(--border);
    padding: 18px 0;
    background: rgba(255, 255, 255, 0.015);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 38s linear infinite;
}

.marquee-track span {
    padding-right: 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
}

@keyframes marquee {
    to {
        transform: translateX(-33.333%);
    }
}

/* ---------- Секции ---------- */

.section {
    position: relative;
    padding: clamp(80px, 10vw, 140px) 0;
}

.section--alt {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.03) 50%, rgba(255, 255, 255, 0.012));
    border-block: 1px solid var(--border);
}

.section-head {
    max-width: 760px;
    margin: 0 auto clamp(48px, 6vw, 72px);
    text-align: center;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text);
}

.section-subtitle {
    margin-top: 18px;
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* ---------- Фото-слоты ---------- */

.photo-slot {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 20% 0%, rgba(77, 227, 193, 0.1), transparent 60%),
        radial-gradient(120% 90% at 100% 100%, rgba(91, 157, 255, 0.12), transparent 60%),
        var(--bg-3);
    border: 1px dashed var(--border-strong);
    isolation: isolate;
}

.photo-slot::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    z-index: -1;
}

.photo-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.6s var(--ease), transform 0.9s var(--ease);
}

/* Добавьте класс has-photo к слоту (или оставьте — JS включит сам),
   и заполните src у img — заглушка исчезнет */
.photo-slot.has-photo {
    border-style: solid;
    border-color: var(--border);
}

.photo-slot.has-photo .photo-img {
    opacity: 1;
    transform: scale(1);
}

.photo-slot.has-photo .photo-placeholder {
    opacity: 0;
    visibility: hidden;
}

.photo-slot:hover .photo-img {
    transform: scale(1.05);
}

.photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-dim);
    transition: opacity 0.4s var(--ease);
}

.photo-placeholder svg {
    width: 30px;
    height: 30px;
    margin-bottom: 6px;
    opacity: 0.7;
}

.photo-placeholder span {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
}

.photo-placeholder small {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.photo-slot--portrait {
    aspect-ratio: 4 / 5;
    border-radius: 18px;
}

.photo-slot--wide {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
}

.photo-slot--small {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
}

.photo-slot--city {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
}

.photo-caption {
    position: absolute;
    left: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(10, 14, 23, 0.7);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.8rem;
    color: var(--text);
    z-index: 4;
}

.photo-slot--gallery {
    border-radius: var(--radius-sm);
    aspect-ratio: 4 / 3;
    transition: transform 0.5s var(--ease), border-color 0.3s, box-shadow 0.5s var(--ease);
}

.photo-slot--gallery:hover {
    transform: translateY(-6px);
    border-color: rgba(77, 227, 193, 0.4);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.9), 0 0 40px -18px var(--accent-glow);
}

/* ---------- Обо мне ---------- */

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(40px, 6vw, 84px);
    align-items: start;
}

.about-media {
    position: relative;
    position: sticky;
    top: calc(var(--header-h) + 32px);
}

.about-quote {
    position: absolute;
    right: -18px;
    bottom: -26px;
    max-width: 290px;
    padding: 18px 22px;
    border-radius: 16px;
    background: rgba(13, 19, 32, 0.88);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 30px 60px -30px #000;
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text);
}

.about-text .section-title {
    margin: 6px 0 26px;
}

.about-text p:not(.eyebrow) {
    color: var(--text-muted);
    margin-bottom: 18px;
}

.feature-list {
    list-style: none;
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

.feature-list li {
    display: flex;
    gap: 16px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.35s, background 0.35s, transform 0.35s var(--ease);
}

.feature-list li:hover {
    border-color: rgba(77, 227, 193, 0.35);
    background: var(--surface-hover);
    transform: translateX(6px);
}

.feature-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(77, 227, 193, 0.2);
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature-list strong {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
}

.feature-list span:not(.feature-icon) {
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* Статистика */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: clamp(56px, 7vw, 90px);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--border);
}

.stat {
    padding: 32px 24px;
    background: var(--bg-2);
    text-align: center;
    transition: background 0.35s;
}

.stat:hover {
    background: var(--bg-3);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(180deg, #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    display: block;
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ---------- Карточки компетенций ---------- */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    position: relative;
    padding: 32px 28px 34px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    overflow: hidden;
    transition: border-color 0.4s, transform 0.4s var(--ease), box-shadow 0.5s var(--ease);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(77, 227, 193, 0.12), transparent 45%);
    transition: opacity 0.4s;
    pointer-events: none;
}

.card:hover {
    border-color: rgba(77, 227, 193, 0.32);
    box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.9);
}

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

.card-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 24px;
    border-radius: 16px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(77, 227, 193, 0.22);
    transition: transform 0.45s var(--ease), box-shadow 0.45s;
}

.card:hover .card-icon {
    transform: translateY(-4px) rotate(-4deg);
    box-shadow: 0 12px 30px -10px var(--accent-glow);
}

.card-icon svg {
    width: 26px;
    height: 26px;
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.card-index {
    position: absolute;
    top: 24px;
    right: 26px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

/* ---------- Умный город ---------- */

.city-section {
    overflow: hidden;
}

.city-section::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 50%;
    width: 90vw;
    height: 70vh;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(77, 227, 193, 0.07), transparent 65%);
    pointer-events: none;
}

.city-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr);
    gap: 24px;
    align-items: start;
}

.city-main {
    display: grid;
    gap: 24px;
}

.city-layers {
    padding: 30px 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.city-layers h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.layer {
    display: flex;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
}

.layer-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    padding-top: 3px;
}

.layer strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.layer p {
    font-size: 0.94rem;
    color: var(--text-muted);
}

.city-aside {
    display: grid;
    gap: 20px;
}

.glass-panel {
    position: relative;
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.city-aside .glass-panel h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.city-aside .glass-panel p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.metric-card {
    padding: 26px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.metric-row em {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.metric-bar {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
    margin-bottom: 20px;
}

.metric-bar:last-child {
    margin-bottom: 0;
}

.metric-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    box-shadow: 0 0 12px var(--accent-glow);
    transition: width 1.6s var(--ease);
}

.in-view .metric-bar span {
    width: var(--w);
}

/* ---------- Дорожная карта ---------- */

.timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
    opacity: 0.4;
}

.timeline-item {
    position: relative;
    padding-top: 36px;
}

.timeline-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 5px rgba(77, 227, 193, 0.1), 0 0 18px var(--accent-glow);
}

.timeline-phase {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.timeline-item h3 {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.timeline-item p {
    font-size: 0.94rem;
    color: var(--text-muted);
}

/* ---------- Галерея ---------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 210px;
    gap: 16px;
}

.photo-slot--gallery {
    aspect-ratio: auto;
    height: 100%;
}

.photo-slot--tall {
    grid-row: span 2;
}

.photo-slot--wide-cell {
    grid-column: span 2;
}

/* ---------- Цитата ---------- */

.quote-section {
    padding-block: clamp(60px, 8vw, 110px);
}

.big-quote {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.big-quote::before {
    content: '';
    position: absolute;
    inset: -40px -20px;
    background: radial-gradient(ellipse at center, rgba(77, 227, 193, 0.08), transparent 65%);
    pointer-events: none;
}

.big-quote blockquote {
    position: relative;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: var(--text);
}

.big-quote figcaption {
    margin-top: 26px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ---------- Контакты ---------- */

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
}

.contact-text .section-title {
    margin: 6px 0 20px;
}

.contact-text > p {
    color: var(--text-muted);
    max-width: 460px;
}

.contact-details {
    display: grid;
    gap: 10px;
    margin-top: 34px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.3s, background 0.3s, transform 0.35s var(--ease);
    font-weight: 500;
}

.contact-item:hover {
    border-color: rgba(77, 227, 193, 0.4);
    background: var(--surface-hover);
    transform: translateX(6px);
}

.contact-item--static:hover {
    transform: none;
}

.contact-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(77, 227, 193, 0.2);
}

.contact-icon svg {
    width: 22px;
    height: 22px;
}

.contact-item small {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 2px;
}

.socials {
    display: flex;
    gap: 10px;
    margin-top: 26px;
}

.social {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    transition: color 0.3s, border-color 0.3s, transform 0.35s var(--ease), background 0.3s;
}

.social svg {
    width: 20px;
    height: 20px;
}

.social:hover {
    color: #04120f;
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
}

/* Форма */

.contact-form {
    display: grid;
    gap: 18px;
    padding: clamp(24px, 3vw, 36px);
}

.field {
    position: relative;
}

.field input,
.field textarea {
    width: 100%;
    padding: 26px 18px 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.field textarea {
    min-height: 130px;
}

.field label {
    position: absolute;
    left: 18px;
    top: 17px;
    font-size: 0.95rem;
    color: var(--text-dim);
    pointer-events: none;
    transform-origin: 0 50%;
    transition: transform 0.25s var(--ease), color 0.25s, top 0.25s;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.28);
    box-shadow: 0 0 0 3px rgba(77, 227, 193, 0.12);
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
    top: 8px;
    transform: scale(0.78);
    color: var(--accent);
}

.field input:user-invalid,
.field textarea:user-invalid {
    border-color: #ff7a7a;
}

.form-status {
    min-height: 1.2em;
    font-size: 0.9rem;
    color: var(--accent);
    text-align: center;
}

/* ---------- Футер ---------- */

.footer {
    padding: 34px 0;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.to-top {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: color 0.3s, border-color 0.3s, transform 0.35s var(--ease);
}

.to-top svg {
    width: 20px;
    height: 20px;
}

.to-top:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
}

/* ---------- Reveal-анимации ---------- */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: calc(var(--rd, 0) * 90ms);
    will-change: opacity, transform;
}

.reveal.in-view {
    opacity: 1;
    transform: none;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1080px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline::before {
        display: none;
    }
}

@media (max-width: 960px) {
    .nav,
    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    .header {
        background: rgba(10, 14, 23, 0.72);
        backdrop-filter: blur(18px) saturate(140%);
        -webkit-backdrop-filter: blur(18px) saturate(140%);
        border-bottom-color: var(--border);
    }

    .nav.open {
        display: flex;
        position: fixed;
        top: var(--header-h);
        left: 12px;
        right: 12px;
        flex-direction: column;
        gap: 4px;
        padding: 14px;
        border-radius: var(--radius);
        border: 1px solid var(--border-strong);
        background: rgba(13, 19, 32, 0.96);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        box-shadow: 0 40px 80px -30px #000;
        animation: menuIn 0.35s var(--ease);
    }

    @keyframes menuIn {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
    }

    .nav.open .nav-link {
        padding: 13px 16px;
        font-size: 1.05rem;
        border-radius: 10px;
    }

    .nav.open .nav-link.active::after {
        left: auto;
        right: 16px;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .hero-visual {
        order: -1;
        max-width: 340px;
    }

    .float-card--a {
        left: -12px;
    }

    .float-card--b {
        right: -12px;
    }

    .scroll-hint {
        display: none;
    }

    .about-layout,
    .city-grid,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .about-media {
        position: relative;
        top: auto;
        max-width: 560px;
        margin: 0 auto;
        width: 100%;
    }

    .about-quote {
        right: 12px;
        bottom: -20px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 190px;
    }

    .photo-slot--wide-cell {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .container {
        padding: 0 18px;
    }

    .hero {
        padding-top: calc(var(--header-h) + 32px);
    }

    .hero-title {
        font-size: clamp(2.3rem, 11vw, 3rem);
    }

    .hero-buttons .btn {
        flex: 1 1 100%;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .timeline-item {
        padding-left: 34px;
        padding-top: 0;
        padding-bottom: 20px;
    }

    .timeline-dot {
        top: 4px;
    }

    .gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }

    .photo-slot--tall {
        grid-row: span 1;
    }

    .photo-slot--wide-cell {
        grid-column: span 1;
    }

    .footer-inner {
        justify-content: center;
        text-align: center;
    }

    .about-quote {
        position: static;
        margin-top: 14px;
        max-width: none;
    }
}

/* Тонкая настройка по устройству */
@media (hover: none) {
    .card::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
