/* 
 * Matthias Portfolio - Exact Adobe Portfolio Clone
 * Complete CSS File with Project Page Centered Layout
 */

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --gray-dark: #333333;
    --text-color: #000000;
    --text-light: #666666;
    --overlay: rgba(255, 255, 255, 0.95);
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
    height: 100%;
}

body {
    font-family: var(--font-primary);
    font-weight: 300;
    color: var(--text-color);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.4;
}

/* ============ LAYOUT ============ */
.site-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Вертикальная разделительная линия */
.site-container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 300px;
    width: 1px;
    height: 100%;
    background: var(--gray-medium);
    z-index: 100;
    pointer-events: none;
}

/* ============ LEFT COLUMN ============ */
.left-column {
    width: 300px;
    min-width: 300px;
    height: 100vh;
    padding: 40px;
    border-right: 1px solid var(--gray-medium);
    background: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.site-header {
    margin-bottom: 40px;
}

.site-title {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    line-height: 1.2;
}

/* Список всех проектов */
.all-projects {
    list-style: none;
    margin: 0 0 40px 0;
    padding: 0;
    width: 100%;
}

.all-projects li {
    margin-bottom: 6px;
}

.all-projects a {
    display: block;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 300;
    padding: 4px 0;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.all-projects a:hover,
.all-projects a.active {
    color: var(--text-color);
    font-weight: 400;
}

/* Основное меню */
.main-navigation {
    margin-bottom: 40px;
}

.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.main-menu li {
    margin-bottom: 6px;
}

.main-menu a {
    display: block;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 300;
    padding: 4px 0;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.main-menu a:hover,
.main-menu a.active {
    color: var(--text-color);
    font-weight: 400;
}

/* Контактная информация */
.contact-info {
    margin-top: auto;
    padding-top: 40px;
    border-top: 1px solid var(--gray-medium);
    width: 100%;
}

.contact-info p {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
}

.contact-info a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-info a:hover {
    color: var(--text-light);
}

/* ============ RIGHT COLUMN ============ */
.right-column {
    flex: 1;
    margin-left: 300px;
    min-height: 100vh;
}

/* ============ HOME PAGE HEADER ============ */
.home-page-header {
    padding: 80px 40px 60px;
    text-align: center;
    border-bottom: 1px solid var(--gray-medium);
}

.page-title {
    font-size: 64px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 0;
    letter-spacing: -1.5px;
}

/* ============ PROJECTS GRID (HOME PAGE) ============ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
}

.project-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    border-bottom: 1px solid var(--gray-medium);
    border-right: 1px solid var(--gray-medium);
}

.project-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.project-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-link:hover .project-image img {
    transform: scale(1.03);
}

/* Эффект наведения (как в 1.png) */
.project-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: var(--overlay);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.project-link:hover .project-overlay {
    opacity: 1;
}

.project-year {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-light);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.project-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.5px;
}

/* ============ PROJECT PAGE CENTERED STYLES ============ */
.project-page .right-column {
    padding: 0;
}

.project-page .project-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px 60px;
    border-bottom: 1px solid var(--gray-medium);
}

.project-page .project-main-title {
    font-size: 64px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 30px;
    letter-spacing: -1.5px;
    max-width: 800px;
}

.project-page .project-description {
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
}

.project-page .project-description p {
    font-size: 18px;
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 20px;
}

.project-page .project-details {
    max-width: 800px;
    margin: 40px auto 60px;
    text-align: center;
    padding: 0 40px;
}

.project-page .project-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.project-page .meta-item {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 300;
}

.project-page .project-services {
    margin-top: 40px;
}

.project-page .project-services h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-page .project-services ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.project-page .project-services li {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 0;
    font-weight: 300;
    padding: 5px 15px;
    background: var(--gray-light);
    border-radius: 20px;
}

/* ============ PROJECT GALLERY ============ */
.project-page .project-gallery {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-page .gallery-item {
    margin-bottom: 40px;
}

.project-page .gallery-item-full {
    grid-column: 1 / -1;
}

.project-page .gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============ PROJECT NAVIGATION ============ */
.project-page .project-navigation {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 60px auto 40px;
    padding: 40px 40px 0;
    border-top: 1px solid var(--gray-medium);
}

.project-page .nav-prev,
.project-page .nav-next {
    text-decoration: none;
    color: var(--text-color);
    transition: color var(--transition-fast);
    text-align: left;
    flex: 1;
}

.project-page .nav-next {
    text-align: right;
}

.project-page .nav-prev:hover,
.project-page .nav-next:hover {
    color: var(--text-light);
}

.project-page .nav-prev span,
.project-page .nav-next span {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 5px;
    font-weight: 300;
}

.project-page .nav-prev h3,
.project-page .nav-next h3 {
    font-size: 18px;
    font-weight: 400;
}

/* ============ ABOUT PAGE ============ */
.about-page .right-column {
    padding: 60px 40px;
}

.about-content {
    max-width: 600px;
}

.about-title {
    font-size: 48px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.about-text p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ============ CONTACT PAGE ============ */
.contact-page .right-column {
    padding: 60px 40px;
}

.contact-title {
    font-size: 48px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.contact-info-page {
    max-width: 600px;
}

.contact-info-page p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 20px;
}

.contact-form {
    margin-top: 40px;
    max-width: 600px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--gray-medium);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 300;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.contact-form button {
    background: var(--black);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.contact-form button:hover {
    opacity: 0.8;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .site-container {
        flex-direction: column;
    }
    
    .site-container::after {
        display: none;
    }
    
    .left-column {
        position: fixed;
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 30px 20px;
        border-right: none;
        border-bottom: 1px solid var(--gray-medium);
        z-index: 1000;
        left: -100%;
        transition: left 0.3s ease;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        background: var(--white);
    }
    
    .left-column.menu-open {
        left: 0;
    }
    
    .right-column {
        margin-left: 0;
        padding-top: 60px; /* Отступ для мобильного меню */
    }
    
    .home-page-header {
        padding: 40px 20px 30px;
    }
    
    .page-title {
        font-size: 48px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    /* Project Page Responsive */
    .project-page .project-header {
        padding: 40px 20px 30px;
    }
    
    .project-page .project-main-title {
        font-size: 48px;
    }
    
    .project-page .project-description p {
        font-size: 16px;
    }
    
    .project-page .project-details {
        padding: 0 20px;
    }
    
    .project-page .project-gallery {
        padding: 20px;
    }
    
    .project-page .project-navigation {
        padding: 40px 20px 0;
        flex-direction: column;
        gap: 30px;
    }
    
    .project-page .nav-prev,
    .project-page .nav-next {
        text-align: center;
    }
    
    /* About & Contact Responsive */
    .about-page .right-column,
    .contact-page .right-column {
        padding: 40px 20px;
    }
    
    .about-title,
    .contact-title {
        font-size: 36px;
    }
    
    .project-gallery {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .home-page-header {
        padding: 30px 15px 20px;
    }
    
    .page-title {
        font-size: 36px;
    }
    
    .project-page .project-header {
        padding: 30px 15px 20px;
    }
    
    .project-page .project-main-title {
        font-size: 36px;
    }
    
    .project-page .project-meta {
        flex-direction: column;
        gap: 15px;
    }
    
    .project-page .project-services ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .project-page .project-services li {
        padding: 8px 15px;
    }
    
    .project-page .project-gallery {
        padding: 15px;
    }
    
    .project-page .project-navigation {
        padding: 30px 15px 0;
    }
    
    /* Home Page */
    .project-main-title,
    .about-title,
    .contact-title {
        font-size: 28px;
    }
    
    .project-title {
        font-size: 20px;
    }
    
    .project-year {
        font-size: 12px;
    }
    
    .project-overlay {
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
}

@media (max-width: 480px) {
    .left-column {
        padding: 20px 15px;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    .all-projects a,
    .main-menu a {
        font-size: 13px;
    }
    
    .contact-info p {
        font-size: 11px;
    }
    
    .home-page-header {
        padding: 25px 10px 15px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .project-page .project-main-title {
        font-size: 28px;
    }
    
    .project-page .project-description p {
        font-size: 15px;
    }
}

/* ============ MOBILE MENU ============ */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--white);
    border: 1px solid var(--gray-medium);
    cursor: pointer;
    z-index: 1001;
    padding: 10px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--black);
    transition: 0.3s;
    transform-origin: center;
    position: relative;
}

/* Убедимся, что все три полоски видны */
.mobile-menu-toggle span:nth-child(1) {
    margin-bottom: 6px;
}

.mobile-menu-toggle span:nth-child(2) {
    margin-bottom: 6px;
}

.mobile-menu-toggle span:nth-child(3) {
    margin-bottom: 0;
}

/* Active state for menu toggle */
.mobile-menu-toggle.menu-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.menu-open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.menu-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu styles */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    body.no-scroll {
        overflow: hidden;
    }
    
    /* Overlay for menu */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .menu-open + .menu-overlay {
        display: block;
    }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-project {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

.animate-fade-up {
    animation: fadeUp 0.6s ease forwards;
    opacity: 0;
}

/* ============ LOADING INDICATOR ============ */
.loading-indicator {
    grid-column: 1 / -1;
    padding: 40px;
    text-align: center;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--black);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============ FORM STYLES ============ */
.error {
    border-color: #dc3545 !important;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.success-message {
    animation: fadeIn 0.3s ease;
}

/* ============ PROJECT HOVER STATES ============ */
.project-item.hover-active .project-overlay {
    opacity: 1 !important;
}

.project-item.touch-active .project-overlay {
    opacity: 1 !important;
}

/* ============ UTILITY CLASSES ============ */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ============ ACCESSIBILITY ============ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--black);
    color: var(--white);
    padding: 8px;
    z-index: 10000;
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
}

/* ============ SELECTION STYLES ============ */
::selection {
    background: rgba(0, 0, 0, 0.1);
    color: var(--black);
}

::-moz-selection {
    background: rgba(0, 0, 0, 0.1);
    color: var(--black);
}

/* ============ FOCUS STYLES ============ */
:focus {
    outline: 2px solid var(--black);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ============ SCROLLBAR STYLES ============ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ============ PRINT STYLES ============ */
@media print {
    .left-column,
    .mobile-menu-toggle,
    .project-navigation {
        display: none !important;
    }
    
    .right-column {
        margin-left: 0;
        padding: 0 !important;
    }
    
    .project-header {
        padding: 20px 0 !important;
        border-bottom: 2px solid #000 !important;
    }
    
    .project-gallery img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}