/* ========================================
   САЙТ-ВИЗИТКА ПЕТРА СОЛОВАРОВА
   Тёмный минималистичный Digital/AI дизайн
   ======================================== */

/* CSS Variables */
:root {
    --bg-primary: #050508;
    --bg-secondary: #0a0a10;
    --bg-card: rgba(15, 15, 25, 0.8);
    --bg-card-hover: rgba(20, 20, 35, 0.9);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    --accent-violet: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --accent-indigo: #6366f1;
    --accent-emerald: #10b981;

    --gradient-primary: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan), var(--accent-pink));
    --gradient-glow: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.4), rgba(236, 72, 153, 0.4));

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(139, 92, 246, 0.3);

    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.15);

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   DIGITAL BACKGROUND (AI/Matrix style)
   ======================================== */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -2;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 60%);
}

.digital-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 24px;
    position: relative;
}

/* Photo */
.hero-photo-wrapper {
    position: relative;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.hero-photo-glow {
    position: absolute;
    inset: -30px;
    background: var(--gradient-primary);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.5;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.9);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.hero-photo-border {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    padding: 4px;
    background: var(--gradient-primary);
    animation: borderRotate 10s linear infinite;
}

@keyframes borderRotate {
    from {
        filter: hue-rotate(0deg);
    }

    to {
        filter: hue-rotate(360deg);
    }
}

.hero-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: 52% 18%;
    background: var(--bg-secondary);
}

/* Name & Title */
.hero-name {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

.hero-title {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

.hero-bio {
    max-width: 550px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

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

/* Social Links */
.hero-socials {
    display: flex;
    gap: 16px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.7s forwards;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.2);
}

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

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 40px;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1s forwards;
}

.scroll-indicator a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-base);
}

.scroll-indicator a:hover {
    color: var(--accent-cyan);
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(8px);
    }

    60% {
        transform: translateY(4px);
    }
}

/* ========================================
   PROJECTS SECTION
   ======================================== */
.projects {
    padding: 100px 24px;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-violet);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Project Cards List */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Project Card */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(30px);
}

.project-card.visible {
    animation: cardReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.project-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.1);
}

/* Project Header */
.project-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    flex-wrap: wrap;
}

.project-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 14px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.project-meta {
    flex: 1;
    min-width: 200px;
}

.project-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.project-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.project-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    color: var(--accent-violet);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.project-link-btn:hover {
    background: rgba(139, 92, 246, 0.25);
    transform: translateY(-2px);
}

.project-link-btn svg {
    width: 16px;
    height: 16px;
}

.project-status {
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    color: var(--accent-emerald);
    font-size: 0.85rem;
    font-weight: 500;
}

.project-status-nda {
    background: rgba(251, 146, 60, 0.15);
    border-color: rgba(251, 146, 60, 0.3);
    color: #fb923c;
}

/* Project Description */
.project-description {
    padding: 0 28px 20px;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Expand Button */
.project-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: none;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
}

.project-expand-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.project-expand-btn svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-base);
}

.project-expand-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* Project Details (expandable) */
.project-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.2);
}

.project-card.expanded .project-details {
    max-height: 2000px;
}

.details-section {
    padding: 24px 28px;
    border-top: 1px solid var(--border-subtle);
}

.details-section:first-child {
    border-top: none;
}

.details-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.details-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.details-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.details-section li {
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}

.details-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
}

.details-section li strong {
    color: var(--text-primary);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.result-item {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.result-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-violet);
    margin-bottom: 4px;
}

.result-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Tech Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    padding: 6px 12px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--accent-cyan);
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
    padding: 100px 24px;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 16px;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

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

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.contact-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.contact-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}

.contact-btn:hover::before {
    opacity: 1;
}

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

.contact-btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
}

.contact-btn-secondary:hover {
    border-color: var(--accent-violet);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.2);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 40px 24px;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .hero {
        padding: 60px 20px;
        min-height: auto;
        padding-top: 100px;
    }

    .hero-photo-border {
        width: 150px;
        height: 150px;
    }

    .hero-socials {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
    }

    .social-link {
        justify-content: center;
    }

    .projects {
        padding: 60px 20px;
    }

    .project-header {
        padding: 20px;
    }

    .project-description {
        padding: 0 20px 16px;
    }

    .details-section {
        padding: 20px;
    }

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

    .project-link-btn {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }

    .project-status {
        width: 100%;
        text-align: center;
        margin-top: 12px;
    }

    .contact {
        padding: 60px 20px;
    }

    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }

    .contact-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-bio {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .project-name {
        font-size: 1.1rem;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

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