/* ========================================
   Дмитрий Шаров — dmitryshrv.ru
   ======================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --text-primary: #e8e6f0;
    --text-secondary: #9590a8;
    --text-muted: #5d5875;
    --accent-1: #7b5cff;
    --accent-2: #ff6b9d;
    --accent-3: #00e5a0;
    --accent-glow: rgba(123, 92, 255, 0.15);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(123, 92, 255, 0.3);
    --font-display: 'Unbounded', sans-serif;
    --font-body: 'Onest', sans-serif;
    --radius: 16px;
    --radius-sm: 10px;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-1) var(--bg-primary);
}

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

/* === NOISE OVERLAY === */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    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)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* === GRID BACKGROUND === */
.grid-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(123, 92, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(123, 92, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* === ORB AMBIENT LIGHTS === */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 20s ease-in-out infinite;
}
.orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(123, 92, 255, 0.12), transparent 70%);
    top: -100px; right: -100px;
    animation-delay: 0s;
}
.orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.08), transparent 70%);
    bottom: 20%; left: -100px;
    animation-delay: -7s;
}
.orb-3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(0, 229, 160, 0.06), transparent 70%);
    top: 50%; right: 10%;
    animation-delay: -14s;
}
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* === LAYOUT === */
.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 80px 0;
}

/* === NAV === */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 16px 0;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    background: rgba(10, 10, 15, 0.7);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}
nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.nav-logo span {
    color: var(--accent-1);
}
.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}
.nav-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 400;
}
.nav-links a:hover {
    color: var(--text-primary);
}

/* === HERO === */
.hero {
    padding-top: 160px;
    padding-bottom: 60px;
    position: relative;
}
.hero-row {
    display: flex;
    align-items: flex-start;
    gap: 48px;
}
.hero-photo {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.15s forwards;
    border: 2px solid var(--border);
    background: var(--bg-card);
}
.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-content {
    flex: 1;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.1s forwards;
}
.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease-in-out infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    line-height: 1.7;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.2s forwards;
}
.hero-links {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.3s forwards;
}
.hero-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: all 0.25s ease;
}
.hero-links a:hover {
    border-color: var(--border-hover);
    background: rgba(123, 92, 255, 0.08);
    transform: translateY(-1px);
}
.hero-links a svg {
    width: 16px; height: 16px;
    fill: currentColor;
    opacity: 0.7;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === SECTION TITLES === */
.section-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-1);
    margin-bottom: 12px;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.2;
}
.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
    margin-bottom: 48px;
}

/* === ABOUT BLOCKS === */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.about-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    opacity: 0;
    transition: opacity 0.3s;
}
.about-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.about-card:hover::before {
    opacity: 1;
}
.about-card-icon {
    font-size: 1.8rem;
    margin-bottom: 16px;
}
.about-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.about-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* === CLIENTS MARQUEE === */
.clients-section {
    padding: 48px 0;
    overflow: hidden;
}
.clients-section .section-label {
    text-align: center;
    margin-bottom: 32px;
}
.marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
    display: flex;
    align-items: center;
    gap: 32px;
    width: max-content;
    animation: marqueeScroll 30s linear infinite;
}
.marquee-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 40px;
    min-height: 72px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    white-space: nowrap;
    transition: all 0.3s ease;
    letter-spacing: -0.01em;
}
.marquee-item img {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.marquee-item:hover img {
    opacity: 1;
}
.marquee-item:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(123, 92, 255, 0.06);
}
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee:hover .marquee-track {
    animation-play-state: paused;
}

/* === PROJECTS === */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}
.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(123, 92, 255, 0.08);
}
.project-icon {
    flex-shrink: 0;
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(123, 92, 255, 0.1);
    border: 1px solid rgba(123, 92, 255, 0.15);
}
.project-icon.pink { background: rgba(255, 107, 157, 0.1); border-color: rgba(255, 107, 157, 0.15); }
.project-icon.green { background: rgba(0, 229, 160, 0.1); border-color: rgba(0, 229, 160, 0.15); }
.project-icon.blue { background: rgba(99, 179, 255, 0.1); border-color: rgba(99, 179, 255, 0.15); }
.project-body { flex: 1; }
.project-body h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.project-body .project-type {
    font-size: 0.75rem;
    color: var(--accent-1);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.project-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.project-tags span {
    font-size: 0.72rem;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
}

/* === VIDEO PREVIEWS === */
.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.video-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}
.video-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(123, 92, 255, 0.1);
}
.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
    overflow: hidden;
}
.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.video-card:hover .video-thumb img {
    transform: scale(1.05);
}
.video-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 56px; height: 56px;
    background: rgba(123, 92, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 4px 24px rgba(123, 92, 255, 0.3);
}
.video-card:hover .video-play {
    background: rgba(123, 92, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
}
.video-play svg {
    width: 20px; height: 20px;
    fill: #fff;
    margin-left: 3px;
}
.video-platform {
    position: absolute;
    top: 12px; right: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
}
.video-info {
    padding: 20px;
}
.video-info h3 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
    line-height: 1.35;
}
.video-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.55;
}
/* placeholder for videos without real thumbnails */
.video-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
}

/* === MEDIA / PUBLICATIONS === */
.media-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.media-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}
.media-item:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}
.media-source {
    font-size: 0.75rem;
    color: var(--accent-2);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
    min-width: 120px;
}
.media-title {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}
.media-arrow {
    margin-left: auto;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.media-item:hover .media-arrow {
    transform: translateX(4px);
    color: var(--accent-1);
}

/* === CONTACT === */
.contact-section {
    text-align: center;
    padding-bottom: 120px;
}
.contact-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    position: relative;
    overflow: hidden;
}
.contact-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-3), var(--accent-2));
}
.contact-email {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s;
}
.contact-email:hover {
    color: var(--accent-1);
}
.contact-socials {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.contact-socials a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: all 0.25s ease;
}
.contact-socials a:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(123, 92, 255, 0.06);
}

/* === FOOTER === */
footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}
footer a {
    color: var(--accent-1);
    text-decoration: none;
}

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    section { padding: 60px 0; }
    .hero { padding-top: 120px; }
    .hero-row {
        flex-direction: column;
        gap: 24px;
    }
    .hero-photo {
        width: 120px;
        height: 120px;
        border-radius: 20px;
    }
    .clients-section { padding: 32px 0; }
    .marquee-item { padding: 14px 28px; min-height: 56px; font-size: 0.9rem; }
    .marquee-item img { height: 32px; max-width: 120px; }
    .marquee-track { gap: 20px; }
    .about-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }
    .project-card {
        flex-direction: column;
        gap: 16px;
    }
    .media-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .media-source { min-width: auto; }
    .nav-links { gap: 20px; }
    .nav-links a { font-size: 0.8rem; }
}
@media (max-width: 480px) {
    .nav-links { display: none; }
    .hero-links { flex-direction: column; }
    .hero-links a { justify-content: center; }
}
