* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.portfolio-item,
.service-item,
.feature-card,
.gallery-card,
.hero-bg,
.cursor,
.nav-links,
.preloader {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

img {
    will-change: auto;
    transform: translateZ(0);
}

.portfolio-panel {
    contain: layout style paint;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent: #ffffff;
    --grid-color: rgba(255, 255, 255, 0.05);
    --noise-opacity: 0.03;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: var(--noise-opacity);
    background-image: 
        radial-gradient(circle at 25% 25%, #ffffff 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, #ffffff 1px, transparent 1px);
    background-size: 50px 50px, 30px 30px;
    pointer-events: none;
    z-index: 1;
}

body {
    cursor: none;
}

.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
}

.cursor.hover {
    transform: scale(2);
}

/* Nav */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.9) 0%, transparent 100%);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 65px;
    border-radius: 2px;
}

.nav-right {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-links a.active::after {
    opacity: 1;
    transform: scale(1);
}

.nav-links a:hover::after {
    opacity: 0.6;
    transform: scale(0.8);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0;
    contain: strict;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) contrast(1.2);
    opacity: 0;
    transition: opacity 2s ease-in-out;
    will-change: opacity;
    transform: translateZ(0);
}

.hero-bg.active {
    opacity: 1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.85) 0%, rgba(10, 10, 10, 0.7) 40%, rgba(10, 10, 10, 0.5) 70%, rgba(10, 10, 10, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 3rem;
}

.hero-text {
    max-width: 550px;
    text-align: left;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 6rem);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 300;
    line-height: 1.5;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-cta:hover {
    border-color: var(--text-primary);
    background: var(--text-primary);
    color: var(--bg-primary);
}

.hero-cta::after {
    content: '→';
    transition: transform 0.3s ease;
}

.hero-cta:hover::after {
    transform: translateX(4px);
}

.hero-indicators {
    position: absolute;
    bottom: 3rem;
    right: 3rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-indicator {
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-indicator.active {
    background: var(--text-primary);
    height: 60px;
}

.hero-counter {
    position: absolute;
    bottom: 3rem;
    left: 3rem;
    z-index: 3;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100px 100px;
    pointer-events: none;
    z-index: 1;
}

.services {
    padding: 8rem 3rem;
    position: relative;
    z-index: 2;
    background: var(--bg-primary);
}

.section-header {
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 6rem;
}

.section-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.6;
}

.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--grid-color);
}

.service-item {
    background: var(--bg-primary);
    padding: 4rem 3rem;
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-item:hover {
    background: var(--bg-secondary);
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.5s ease;
}

.service-item:hover::before {
    width: 100%;
}

.service-icon {
    font-size: 2.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0.4;
    transform: rotate(-12deg) scale(0.9);
    display: inline-block;
    filter: blur(0.5px);
    position: relative;
}

.service-icon::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: -1;
}

.service-item:hover .service-icon {
    color: var(--text-primary);
    opacity: 1;
    transform: rotate(8deg) translateY(-10px) scale(1.2);
    filter: blur(0px) drop-shadow(0 5px 15px rgba(255, 255, 255, 0.2));
}

.service-item:hover .service-icon::before {
    opacity: 1;
    transform: rotate(180deg) scale(1.5);
}

.service-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.service-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.service-tech {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.portfolio {
    padding: 8rem 0;
    background: var(--bg-secondary);
    position: relative;
}

.portfolio-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background: var(--bg-primary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.5s ease;
}

.portfolio-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(10, 10, 10, 0.9));
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portfolio-type {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

/* Contact Section */
.contact {
    padding: 8rem 3rem;
    background: var(--bg-primary);
    position: relative;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: start;
}

.contact-info {
    padding: 0;
}

.contact-main-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.contact-person {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--grid-color);
}

.contact-person-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--grid-color);
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.contact-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.contact-value {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
}

.contact-value a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-value a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.contact-map {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    height: fit-content;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-map iframe {
    width: 100%;
    height: 500px;
    border: none;
    filter: invert(90%) hue-rotate(180deg) saturate(0.8) brightness(0.9);
}

/* Footer */
.footer {
    padding: 4rem 3rem 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--grid-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: auto;
    height: auto;
}

.menu-toggle i {
    color: var(--text-primary);
    font-size: 1.2rem;
}

/* Hero Title Typing Effect */
.typing-char {
    display: inline-block;
    transition: opacity 0.1s ease;
}

.title-line {
    line-height: 0.9; 
}

.partners {
    padding: 60px 0 40px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.partners-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.partners .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.partners .section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-family: 'Space Grotesk', sans-serif;
}

.partners .section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.partners-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 160px;
}

.partner-item:hover {
    transform: translateY(-3px);
}

.partner-logo {
    max-width: 100%;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.6) opacity(0.8);
    transition: all 0.3s ease;
}

.partner-item:hover .partner-logo {
    filter: grayscale(0%) brightness(1) opacity(1);
    transform: scale(1.08);
}

/* Preloader - Fixed version */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    width: 120px;
    height: auto;
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.preloader-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.preloader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.preloader-progress {
    height: 100%;
    background: var(--text-primary);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.preloader-progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Portfolio Expandable Panel */
.portfolio-panel {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0 0 12px 12px;
    margin-top: 2rem;
    position: relative;
}

.portfolio-panel.active {
    max-height: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.panel-content {
    padding: 0;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease 0.2s;
}

.portfolio-panel.active .panel-content {
    opacity: 1;
    transform: translateY(0);
}

.panel-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--grid-color);
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    position: relative;
    overflow: hidden;
}

.panel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.portfolio-panel.active .panel-header::before {
    transform: translateX(100%);
}

.panel-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.1;
}

.panel-subtitle {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.panel-body {
    padding: 2rem;
}

.panel-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.panel-features {
    margin-bottom: 2rem;
}

.panel-features h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.feature-card {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 8px;
    border-left: 3px solid var(--text-primary);
    transition: all 0.3s ease;
    transform: translateY(30px);
    opacity: 0;
}

.portfolio-panel.active .feature-card {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-panel.active .feature-card:nth-child(1) { transition-delay: 0.3s; }
.portfolio-panel.active .feature-card:nth-child(2) { transition-delay: 0.4s; }
.portfolio-panel.active .feature-card:nth-child(3) { transition-delay: 0.5s; }

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.feature-card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.feature-card-description {
    color: var(--text-secondary);
    line-height: 1.4;
    font-size: 0.9rem;
}

.panel-gallery {
    margin-bottom: 1rem;
}

.panel-gallery h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-card {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(0.95);
    opacity: 0;
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
    .gallery-card {
        touch-action: manipulation;
    }
    
    .gallery-card:active {
        transform: scale(0.97);
        opacity: 0.8;
    }
    
    .portfolio-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .feature-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

.portfolio-panel.active .gallery-card {
    transform: scale(1);
    opacity: 1;
}

.portfolio-panel.active .gallery-card:nth-child(1) { transition-delay: 0.4s; }
.portfolio-panel.active .gallery-card:nth-child(2) { transition-delay: 0.5s; }
.portfolio-panel.active .gallery-card:nth-child(3) { transition-delay: 0.6s; }
.portfolio-panel.active .gallery-card:nth-child(4) { transition-delay: 0.7s; }

.gallery-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0%);
    transition: all 0.3s ease;
}

.gallery-card:hover img {
    filter: grayscale(0%) brightness(1.1);
    transform: scale(1.02);
}

.panel-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.panel-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Active portfolio item styling */
.portfolio-item.active {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.portfolio-item.active img {
    filter: grayscale(0%);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .portfolio-panel.active {
        max-height: 1200px;
    }
    
    .panel-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .panel-title {
        font-size: 1.4rem;
    }
    
    .panel-subtitle {
        font-size: 0.75rem;
    }
    
    .panel-body {
        padding: 1.5rem 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.2rem;
    }
    
    .feature-card-title {
        font-size: 0.95rem;
    }
    
    .feature-card-description {
        font-size: 0.85rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .panel-close {
        top: 0.8rem;
        right: 0.8rem;
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .panel-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .panel-features h3,
    .panel-gallery h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .portfolio-panel.active {
        max-height: 1400px;
    }
    
    .panel-header {
        padding: 1rem;
    }
    
    .panel-title {
        font-size: 1.3rem;
        line-height: 1.2;
    }
    
    .panel-subtitle {
        font-size: 0.7rem;
    }
    
    .panel-body {
        padding: 1rem;
    }
    
    .panel-description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-card {
        min-height: 200px;
        aspect-ratio: 16/10;
    }
    
    .feature-card {
        padding: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-card-title {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .feature-card-description {
        font-size: 0.8rem;
    }
    
    .panel-features h3,
    .panel-gallery h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .panel-close {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
        top: 0.5rem;
        right: 0.5rem;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 1.5rem 2rem;
        justify-content: space-between;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.25s ease-out;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
    }

    .nav-links.active {
        right: 0;
        opacity: 1;
        visibility: visible;
    }

    .menu-toggle {
        display: block !important;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 1.2rem;
        cursor: pointer;
        padding: 0.8rem;
        width: auto;
        height: auto;
        z-index: 1001;
        position: relative;
        transition: transform 0.2s ease;
        border-radius: 4px;
    }

    .menu-toggle:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.1);
    }

    .menu-toggle i {
        color: var(--text-primary);
        font-size: 1.2rem;
        transition: transform 0.2s ease;
    }

    .hero {
        padding: 0;
    }

    .hero-content {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        justify-content: flex-start;
        text-align: left;
        min-height: 60vh;
    }

    .hero-text {
        max-width: none;
        width: 100%;
        text-align: left;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 0.95;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.4;
    }

    /* Hero indicators tablet optimizations */
    .hero-indicators {
        bottom: 1.5rem;
        right: 1.5rem;
        gap: 0.8rem;
    }

    .hero-indicator {
        width: 3px;
        height: 30px;
        padding: 0;
        border-radius: 1px;
    }

    .hero-indicator.active {
        height: 45px;
    }

    .hero-counter {
        bottom: 1.5rem;
        left: 1.5rem;
        font-size: 0.8rem;
    }

    .services {
        padding: 4rem 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-item {
        padding: 3rem 2rem;
    }

    .portfolio {
        padding: 4rem 0;
    }

    .portfolio-container {
        padding: 0 2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-item {
        min-height: 250px;
        border-radius: 12px;
        position: relative;
        cursor: pointer;
    }
    
    .portfolio-item:active {
        transform: scale(0.98);
    }
    
    .portfolio-overlay {
        background: linear-gradient(transparent 40%, rgba(10, 10, 10, 0.95));
        transform: translateY(0);
        padding: 1.5rem;
    }
    
    .portfolio-title {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .portfolio-type {
        font-size: 0.85rem;
        line-height: 1.2;
    }

    .contact {
        padding: 4rem 2rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-main-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .contact-person {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .contact-person-name {
        font-size: 1.3rem;
    }

    .contact-item {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .contact-value {
        font-size: 1.1rem;
    }

    .contact-map {
        margin-top: 1rem;
    }

    .contact-map iframe {
        height: 300px;
    }

    .footer {
        padding: 3rem 2rem 2rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .cursor {
        display: none;
    }

    body {
        cursor: default;
    }

    .partners {
        padding: 40px 0 30px;
    }
    
    .partners-container {
        padding: 0 20px;
    }
    
    .partners .section-header {
        margin-bottom: 30px;
    }
    
    .partners-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        justify-items: center;
    }
    
    .partner-item {
        min-width: auto;
        width: 100%;
        padding: 0.8rem;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    .partner-item:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.05);
    }
    
    .partner-logo {
        max-height: 80px;
    }
}

/* Mobile First - Critical improvements */
@media (max-width: 480px) {
    /* Hero optimizations */
    .hero {
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    .hero-content {
        padding: 0 1rem;
        min-height: 85vh;
        min-height: 85dvh;
        justify-content: center;
        align-items: flex-start;
        padding-top: 20vh;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 0.9;
        margin-bottom: 1.5rem;
        letter-spacing: -0.02em;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 2rem;
        max-width: 90%;
    }

    .hero-cta {
        padding: 1rem 1.8rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
        text-align: center;
    }

    /* Navigation improvements */
    .nav {
        padding: 1rem 1.5rem;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .menu-toggle {
        padding: 1rem;
        margin: -1rem;
        touch-action: manipulation;
    }

    /* Hero indicators mobile friendly */
    .hero-indicators {
        bottom: 2rem;
        right: 1rem;
        gap: 0.5rem;
        transform: scale(0.8);
    }

    .hero-indicator {
        width: 3px;
        height: 20px;
        background: rgba(255, 255, 255, 0.4);
        border-radius: 1px;
    }

    .hero-indicator.active {
        height: 30px;
        background: var(--text-primary);
    }

    .hero-counter {
        bottom: 2rem;
        left: 1rem;
        font-size: 0.75rem;
    }

    /* Services mobile optimization */
    .services {
        padding: 3rem 1rem;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .section-title {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }
    
    .section-description {
        font-size: 1rem;
        line-height: 1.5;
    }

    .service-item {
        padding: 2.5rem 1.5rem;
    }
    
    .service-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .service-description {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .service-tech {
        font-size: 0.75rem;
    }

    /* Portfolio mobile improvements */
    .portfolio {
        padding: 3rem 0;
    }
    
    .portfolio-container {
        padding: 0 1rem;
    }
    
    .portfolio-grid {
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .portfolio-item {
        min-height: 220px;
        border-radius: 8px;
    }
    
    .portfolio-overlay {
        padding: 1.2rem;
        background: linear-gradient(transparent 20%, rgba(10, 10, 10, 0.95));
        transform: translateY(0);
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        min-height: 40%;
    }
    
    .portfolio-title {
        font-size: 1rem;
        line-height: 1.2;
        margin-bottom: 0.4rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .portfolio-type {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    /* Contact mobile optimization */
    .contact {
        padding: 3rem 1rem;
    }

    .contact-main-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .contact-person-name {
        font-size: 1.3rem;
    }

    .contact-item {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .contact-value {
        font-size: 1.1rem;
        word-break: break-word;
    }

    .contact-map iframe {
        height: 280px;
        border-radius: 8px;
    }

    /* Partners mobile */
    .partners {
        padding: 2rem 0 1.5rem;
    }
    
    .partners-container {
        padding: 0 1rem;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .partner-item {
        padding: 0.8rem;
        border-radius: 6px;
    }
    
    .partner-logo {
        max-height: 65px;
    }

    /* Footer mobile */
    .footer {
        padding: 2rem 1rem 1.5rem;
    }
    
    .footer-container {
        gap: 1.5rem;
    }
    
    .footer-copy {
        font-size: 0.75rem;
    }
    
    .footer-links {
        gap: 1.5rem;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }

    /* Touch improvements */
    .nav-links a,
    .hero-cta,
    .partner-item,
    .portfolio-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    
    /* Prevent zoom on input focus */
    input, textarea, select {
        font-size: 16px;
    }
    
    /* Smooth scrolling optimization for mobile */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    .partners-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        justify-items: center;
    }
    
    .partner-item {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
    
    .partner-logo {
        max-height: 80px;
    }
}

@media (max-width: 480px) {
    .partners-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .partner-logo {
        max-height: 70px;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
}
