@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    color-scheme: light only; 

    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-hover: rgba(255, 255, 255, 0.85);
    --text-main: #1a1a1b;
    --text-muted: #555;
    --accent: #6366f1;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;

    forced-color-adjust: none;
    -webkit-forced-color-adjust: none;
}

*:focus, *:active { outline: none; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    color: var(--text-main) !important;
    background-color: #f8fafc !important; 
    line-height: 1.6;
    min-height: 100vh;
}

body > *:not(.header):not(.bg-mesh):not(script) {
    animation: fadeInPage 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
}

@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-exit > *:not(.header):not(.bg-mesh):not(script) {
    animation: fadeOutPage 0.25s cubic-bezier(0.165, 0.84, 0.44, 1) forwards !important;
}

@keyframes fadeOutPage {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

.page-exit .header {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: #f8fafc !important;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(219, 234, 254, 0.7) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(252, 231, 243, 0.7) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.9) 0%, transparent 60%);
    filter: blur(60px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1200px;
    z-index: 100;
    
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.logo img {
    height: 35px;
    width: 35px;
    object-fit: contain;
}

.logo span {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

nav a, .back-btn {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease, transform 0.2s ease;
}

nav a:hover, .back-btn:hover {
    color: var(--text-main);
    transform: translateY(-1px);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 8px;
    border-radius: 20px;
    margin-left: 10px;
}

.lang-btn {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 2px 4px;
}

.lang-btn.active {
    color: var(--accent);
}

.lang-divider {
    width: 1px;
    height: 12px;
    background: rgba(0,0,0,0.1);
}

.about-section {
    padding: 140px 0 80px;
    text-align: center;
}

.hero-logo {
    max-width: 100%;
    width: 450px;
    height: auto;
    display: block;
    margin: 0 auto 40px auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.05));
    transition: transform 0.5s ease;
}

.hero-logo:hover {
    transform: scale(1.02);
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin: 0 auto 20px auto;
    max-width: 800px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.about-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    background: var(--glass-hover);
}

.about-item h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.approach-title {
    margin-top: 80px;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.approach-list {
    margin-top: 20px;
    list-style-position: inside;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.approach-list li {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.portfolio-section {
    padding: 60px 0 100px;
}

.portfolio-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: rgba(255,255,255,0.8);
}

.portfolio-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.portfolio-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portfolio-item:hover .portfolio-image-wrapper img {
    transform: scale(1.08);
}

.portfolio-info {
    padding: 20px;
}

.portfolio-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.portfolio-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.contacts-section {
    padding: 0 0 100px;
}

.contacts-wrapper {
    display: flex;
    justify-content: center;
}

.contact-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    background: var(--glass-hover);
}

.contact-card a, .contact-address {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.contact-card a:hover {
    color: var(--accent);
    transform: scale(1.05);
}

.contact-address {
    color: var(--text-muted);
    margin-top: 5px;
}

.collab-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    pointer-events: none;
}

.collab-badge-large {
    display: inline-block;
    margin-top: 15px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
}

.project-page {
    padding: 140px 24px 60px;
    max-width: 900px;
    margin: 0 auto;
}

.project-page h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
    text-align: center;
}

.location {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
    text-align: center;
}

.project-info {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    font-size: 1.1rem;
    margin-bottom: 50px;
    line-height: 1.8;
    color: var(--text-main);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.project-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.project-gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

footer {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.reveal-on-scroll {
    opacity: 0;
    visibility: hidden;
}

.reveal-on-scroll.is-visible {
    visibility: visible;
    animation: scrollFadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes scrollFadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 5px;
}

@media (max-width: 768px) {
    .header {
        padding: 10px 16px;
        top: 10px;
        width: calc(100% - 20px);
        border-radius: 12px;
        flex-wrap: wrap; 
    }
    
    .logo {
        gap: 8px; 
    }
    
    .logo img {
        height: 30px;
        width: 30px;
    }
    
    .logo span { 
        display: block; 
        font-size: 11px; 
        letter-spacing: 0; 
    }
    
    .mobile-menu-btn { 
        display: block; 
        margin-left: auto; 
        transition: transform 0.2s ease;
    }

    .mobile-menu-btn:active {
        transform: scale(0.9);
    }
    
    .mobile-collapsible {
        display: flex;
        width: 100%;
        flex-direction: column;
        align-items: center;
        
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 0;
        gap: 0;
        border-top: 1px solid transparent;
        
        transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease, padding 0.3s ease, margin 0.3s ease, gap 0.3s ease;
    }

    
    .mobile-collapsible.open {
        max-height: 220px; 
        opacity: 1;
        visibility: visible;
        gap: 16px;
        
        margin-top: 12px;
        padding-top: 16px;
        padding-bottom: 12px;
        border-top: 1px solid rgba(0,0,0,0.05);
    }
    
    nav a, .back-btn { font-size: 14px; }
    
    .lang-switcher { margin-left: 0; margin-top: 5px; }

    .hero-logo { width: 85%; }
    .about-section { padding: 110px 0 60px; }
    .project-info {
        padding: 24px;
        border-radius: 16px;
        font-size: 1rem;
    }
    .portfolio-grid { grid-template-columns: 1fr; }
    .portfolio-image-wrapper { aspect-ratio: 16 / 10; }
    .contact-card { padding: 30px 20px; }
    .contact-card a { font-size: 1.1rem; }
}
