/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
    color: #000;
    background: #fff !important;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 90%;
    margin: 0 auto;
    margin-top: 10rem;
    padding: 0 2rem;
    background: #fff !important;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem 0;
    transition: background 0.3s ease;
}

.nav-container {
    width: 90%;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
}

.nav-left {
    justify-self: start;
}

.nav-center {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-center .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: #000;
    text-decoration: none;
}

.nav-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    object-fit: cover;
}

.nav-right {
    justify-self: end;
    display: flex;
    gap: 1rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 300;
    color: #000;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    color: #000;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2rem;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    opacity: 0.7;
}

.nav-link::after {
    display: none;
}

.nav-link:hover::after {
    display: none;
}

/* Button styles */
.button-black {
    background: #000;
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 400;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.button-black:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.button-black:active {
    transform: translateY(0);
}

.button-black .icon {
    width: 16px;
    height: 16px;
    font-size: 1.1rem;
    line-height: 1;
    filter: brightness(0) invert(1);
}

/* Main content */
.main {
    display: flex;
    align-items: flex-start;
    padding-top: 8rem;
    margin-top: 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 10rem;
}

.hero-text {
    text-align: left;
}

.hero-photo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.greeting {
    display: inline;
    font-size: 1em;
    font-weight: 300;
    opacity: 0.8;
}

.name {
    display: inline;
    font-weight: 300;
    margin-right: 0.5rem;
    background: linear-gradient(45deg, #ff7e5f, #feb47b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.role {
    display: inline;
    font-size: 1em;
    font-weight: 300;
    opacity: 0.8;
}

.profile-image {
    width: 500px;
    height: 600px;
    border-radius: 8px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.5s ease;
    cursor: pointer;
}

.profile-image:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 1s forwards;
}

.location {
    display: block;
    opacity: 0.8;
    font-size: 0.8em;
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 120px auto;
    opacity: 0;
    animation: fadeInUp 1s ease 1.5s forwards;
}

.hero-description p {
    color: #333;
}

.hero-contacts {
    margin-top: 5rem;
    opacity: 0;
    animation: fadeInUp 1s ease 2s forwards;
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    margin-bottom: 4rem;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

/* About section */
.about {
    background: #f5f5f5;
}

.about-text {
    font-size: 1.5rem;
    line-height: 1.6;
    max-width: 800px;
    color: #333;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

/* Work section */
#work {
    padding-top: 0;
    margin-top: 0;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.work-item {
    position: relative;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    aspect-ratio: 5/3;
}

.work-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.work-item:nth-child(1) { animation-delay: 0.1s; }
.work-item:nth-child(2) { animation-delay: 0.2s; }
.work-item:nth-child(3) { animation-delay: 0.3s; }
.work-item:nth-child(4) { animation-delay: 0.4s; }

.work-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.work-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 300;
}

.work-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 0 0 12px 12px;
}

.work-item:hover .work-content {
    opacity: 1;
}

.work-item:hover .work-image img {
    transform: scale(1.05);
}

.work-tags {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.work-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 0.5rem;
}

.work-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.work-item-link:hover {
    transform: translateY(-5px);
}

/* Case Study Styles */
.case-main {
    background: #fff !important;
    padding: 2rem 0 0 0;
    text-align: center;
}

.case-main .container {
    background: #fff !important;
}

.case-hero {
    width: 90%;
    margin: 0 auto;
    text-align: left;
}

.case-meta {
    margin-bottom: 2rem;
}

.case-tag {
    background: #fff;
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
    font-weight: 500;
}

.case-title {
    font-size: 5rem;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: #000;
    width: 90%;
}

.case-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #000 !important;
    margin-bottom: 3rem;
    width: 90%;
    text-align: left;
}

.case-stats {
    display: flex;
    gap: 4rem;
    width: 90%;
    margin: 0;
}

.stat-item {
    text-align: left;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #000 !important;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.2rem;
    color: #000 !important;
    line-height: 1.4;
}

.case-content {
    background: #fff !important;
}

.case-content .container {
    background: #fff !important;
}

.case-toc {
    width: 90%;
    margin: 0 auto 4rem auto;
    text-align: center;
}

.case-toc h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 2rem;
}

.case-toc ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.case-toc li a {
    color: #000 !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.case-toc li a:hover {
    color: #666 !important;
}

.case-section {
    width: 90%;
    margin: 0 auto 4rem auto;
    text-align: left;
}

.case-section + .case-section {
    margin-top: 4rem;
}

.case-section h2 {
    font-size: 2.5rem;
    font-weight: 500;
    color: #000 !important;
    margin-bottom: 3rem;
    text-align: left;
}

.case-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000 !important;
    margin-bottom: 1.5rem;
    text-align: left;
}

.case-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000 !important;
    margin-bottom: 1rem;
}

.case-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #000 !important;
    margin-bottom: 1.5rem;
}

.case-section ul, .case-section ol {
    text-align: left;
    width: 100%;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #000 !important;
}

.case-goals, .case-tasks {
    background: #fff !important;
    padding: 0;
    margin-bottom: 4rem;
}

.methods-grid, .features-grid {
    display: block;
    margin-bottom: 4rem;
}

.method-item, .feature-item {
    background: #fff !important;
    padding: 0;
    margin-bottom: 2rem;
    text-align: left;
}

.method-item h4, .feature-item h4 {
    margin-bottom: 1rem;
    color: #000 !important;
}

.method-item p, .feature-item p {
    margin-bottom: 0;
    color: #000 !important;
}

.process-steps {
    display: block;
    margin-bottom: 4rem;
}

.step {
    text-align: left;
    margin-bottom: 2rem;
}

.step-number {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #000 !important;
    margin-right: 1rem;
}

.step-content h4 {
    margin-bottom: 0.5rem;
    color: #000 !important;
}

.step-content p {
    margin-bottom: 0;
    color: #000 !important;
}

.results-stats {
    display: block;
}

.result-stat {
    text-align: left;
    background: #fff !important;
    padding: 0;
    margin-bottom: 2rem;
}

.result-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000 !important;
    margin-bottom: 0.5rem;
}

.result-label {
    font-size: 0.9rem;
    color: #000 !important;
    line-height: 1.4;
}

.case-navigation {
    background: #fff !important;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid #ddd;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: 0 auto;
}

.nav-link-prev, .nav-link-next {
    color: #000 !important;
    text-decoration: none;
    font-weight: 500;
    padding: 1rem 2rem;
    border: 1px solid #000;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link-prev:hover, .nav-link-next:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Footer */
.footer {
    background: #fff;
    padding: 2rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 4rem;
}

.copyright {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    margin: 0;
}

/* Contact section */
.contact {
    background: #f5f5f5;
}

.contact-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.contact-link {
    color: #000;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 400;
    transition: opacity 0.3s ease;
}

.contact-link:hover {
    opacity: 0.7;
}

.separator {
    color: #666;
    font-size: 2rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #000;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #666;
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover effects */
.work-item:hover .work-image {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.work-item:hover .work-title {
    color: #666;
    transition: color 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
        margin-top: 40px;
        margin-bottom: 0;
    }
    
    .nav-container {
        padding: 0 1.5rem;
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    /* Скрываем nav-left и nav-center на мобильных */
    .nav-left, .nav-center {
        display: none;
    }
    
     .mobile-menu-btn {
        display: none !important;
    }
    
    .nav-right {
        justify-self: center;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .button-black {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .main {
        padding-top: 6rem;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1.25rem, 6vw, 2rem);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-photo {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        padding: 0;
    }
    
    .profile-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 0;
        display: block;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .work-title {
        font-size: 1.25rem;
    }
    
    .work-description {
        font-size: 0.9rem;
    }
    
    .case-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .methods-grid, .features-grid {
        grid-template-columns: 1fr;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .case-toc ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .separator {
        display: none;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    /* Скрыть кнопку с классом mobile-menu-btn */
    .mobile-menu-btn {
        display: none !important;
    }

    .nav-container {
        padding: 0 1rem;
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 1rem;
    }

    section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .about-text {
        font-size: 1.25rem;
    }

    .work-grid {
        gap: 4rem;
    }

    .work-title {
        font-size: 1.25rem;
    }

    .contact-link {
        font-size: 1.1rem;
    }

    .profile-image {
        width: 90%;
        max-width: 90%;
        height: auto;
        border-radius: 16px;
        display: block;
    }
}


/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for accessibility */
.nav-link:focus,
.contact-link:focus,
.back-to-top:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-description p,
    .about-text {
        color: #fff;
    }
    
    .work-tags {
        color: #fff;
    }
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    max-width: 520px;
    margin: 10vh auto;
    background: #111;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.modal-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-text {
    margin: 0 0 16px 0;
    color: #bbb;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 20px;
    line-height: 36px;
    cursor: pointer;
}

.modal-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}