:root {
    /* Color Palette - Earthy & Botanical */
    --bg-color: #dadbdc;
    /* Matched to the new asset background for a seamless blend */
    --text-main: #142a22;
    /* Deep forest green */
    --text-muted: #4e6a5d;
    /* Softer green for secondary text */
    --accent: #5e8068;
    /* Sage green */
    --accent-floral: #d8c4d1;
    /* Subtle floral pink/purple tint */
    --card-bg: #f3f4f6;

    /* Typography */
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* Variables */
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(20, 42, 34, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 700;
}

.section-title {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    position: relative;
    display: inline-block;
}

/* Add a subtle botanical underline to titles */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 8rem 0;
}

/* Navigation - Glassmorphism */
.navbar {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 1rem 2.5rem;
    z-index: 1000;
    display: flex;
    justify-content: center;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
    width: 95%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.85);
    top: 1.5rem;
    padding: 0.8rem 3rem;
    box-shadow: 0 10px 40px rgba(20, 42, 34, 0.08);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Language Switch Toggle */
.lang-switch {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(20, 42, 34, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

.lang-switch:hover {
    background: var(--accent);
    color: var(--card-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(94, 128, 104, 0.3);
    border-color: var(--accent);
}

.lang-switch.switching {
    animation: popSwitch 0.3s ease;
}

@keyframes popSwitch {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200vh;
    display: flex;
    flex-direction: column;
    transition: transform 1s cubic-bezier(0.86, 0, 0.07, 1);
}

.hero-slider.show-slide-2 {
    transform: translateY(-100vh);
}

.hero-slide {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Original Slide */
.hero-slide:nth-child(1) {
    background: radial-gradient(circle at center, #ffffff 0%, var(--bg-color) 100%);
}

.hero-slide:nth-child(1)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--accent-floral) 0%, rgba(255, 255, 255, 0) 60%);
    opacity: 0.15;
    transform: translate(-50%, -50%);
    z-index: 1;
    border-radius: 50%;
    pointer-events: none;
}

/* Glass Minimalist Slide */
.glass-mode {
    background: radial-gradient(circle at center, #ffffff 0%, #f4f5f6 100%);
}

.glass-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 15vw;
    line-height: 0.85;
    color: #111;
    text-align: center;
    opacity: 0.03;
    z-index: 1;
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: -2px;
}

.glass-mid-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-serif);
    /* Serif to match titles */
    font-weight: 700;
    font-size: 8vw;
    color: #142a22;
    z-index: 2;
    white-space: nowrap;
    letter-spacing: 5px;
    pointer-events: none;
}

.glass-letters-container {
    position: relative;
    /* We don't set z-index here so children can stack freely with siblings like mid-text */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 900px;
    padding: 0 2rem;
}

.glass-letter {
    height: 35vh;
    max-height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* L and K in front of MY NAME (which is z-index 2) */
.letter-l,
.letter-k {
    z-index: 3;
}

/* 1 and A are behind MY NAME */
.letter-1,
.letter-a {
    z-index: 1;
    margin: 0 -25px;
    /* Pull them under the neighboring letters to create overlap */
}

.glass-letter:hover {
    transform: scale(1.05) translateY(-5px);
    z-index: 4;
    /* Pop to front on hover */
}

.hero-content {
    text-align: center;
    z-index: 2;
    margin-top: -3rem;
    width: 100%;
}

.hero-image-wrapper {
    max-width: 900px;
    margin: 0 auto;
    perspective: 1000px;
    position: relative;
    padding: 0 2rem;
}

/* Soft white glow behind logo */
.hero-image-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 50%;
    background: var(--card-bg);
    filter: blur(80px);
    z-index: -1;
    border-radius: 50%;
    opacity: 0.6;
}

#hero-logo {
    width: 100%;
    height: auto;
    /* Static image */
    position: relative;
    z-index: 2;
}

/* Big Background Text Styles */
.bg-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 10vw;
    /* Уменьшенный размер текста */
    line-height: 0.8;
    color: #000;
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
    letter-spacing: -2px;
}

.bg-text-top {
    top: 5%;
    /* Придвинул чуть ближе к "L1KA" */
}

.bg-text-bottom {
    bottom: 5%;
    /* Придвинул чуть ближе снизу */
}

.hidden-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.subtitle {
    margin-top: -1rem;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    z-index: -1;
}

.slider-controls {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    z-index: 10;
}

/* Navigation Arrows */
.slider-arrow {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--glass-shadow);
    animation: floatingArrow 2s ease-in-out infinite;
}

@keyframes floatingArrow {
    0% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(5px);
    }

    100% {
        transform: translateX(-50%) translateY(0);
    }
}

.slider-arrow:hover {
    background: var(--accent);
    color: #fff;
    /* On hover, we keep it centered and stop the floating effect slightly but keep it lifted */
    transform: translateX(-50%) translateY(-2px);
    border-color: var(--accent);
    animation: none;
}

.up-arrow {
    top: 6rem;
    /* Below navbar */
}

.down-arrow {
    bottom: 6rem;
    /* Above scroll indicator */
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.mouse {
    width: 22px;
    height: 34px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
    opacity: 0.7;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 50%;
    animation: scrollMove 2s cubic-bezier(0.15, 0.41, 0.69, 0.94) infinite;
}

@keyframes scrollMove {
    0% {
        top: 5px;
        opacity: 1;
    }

    100% {
        top: 18px;
        opacity: 0;
    }
}

/* About Section - Typography Statement */
.typography-about {
    max-width: 900px;
    margin: 2rem auto;
}

.big-statement {
    font-size: 3rem;
    font-family: var(--font-serif);
    line-height: 1.3;
    color: var(--text-main);
    font-weight: 400;
}

/* Expertise / Core Technologies Section */
.expertise {
    background-color: var(--card-bg);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
    padding: 0 2rem;
}

.tech-card {
    background: var(--bg-color);
    padding: 3rem 2rem;
    border-radius: 24px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

/* Subtle tech border effect */
.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #142a22, #5e8068);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tech-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(20, 42, 34, 0.08);
}

.tech-card:hover::before {
    opacity: 1;
}

.tech-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem auto;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: 0 8px 24px rgba(20, 42, 34, 0.05);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    /* Ensure images stay inside the circle */
}

/* Styling for uploaded technology photos */
.tech-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Keeps the aspect ratio but fills the space */
    padding: 15px;
    /* Adds a bit of breathing room around the logo */
}

/* Glow effect on hover */
.tech-card:hover .tech-icon {
    background: var(--accent);
    color: var(--card-bg);
    box-shadow: 0 12px 30px rgba(94, 128, 104, 0.4);
    transform: scale(1.1);
}

.tech-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.tech-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* Projects Section */
.projects {
    position: relative;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3.5rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 15px 35px rgba(20, 42, 34, 0.04);
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(20, 42, 34, 0.1);
}

.project-image {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s ease;
}

/* Inner zoom effect */
.project-card:hover .project-image {
    transform: scale(1.02);
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(20, 42, 34, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.project-card:hover .project-image::after {
    opacity: 1;
}

.project-info {
    padding: 2.5rem;
    position: relative;
    background: var(--card-bg);
    /* ensure it overlays over zoomed image */
    z-index: 2;
}

.project-info h3 {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
}

.project-info p {
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
}

.btn-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .btn-link {
    color: var(--accent);
}

.project-card:hover .btn-link::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Contact Section */
.contact {
    background-color: var(--card-bg);
    margin-top: 4rem;
    border-radius: 60px 60px 0 0;
    box-shadow: 0 -10px 40px rgba(20, 42, 34, 0.03);
    position: relative;
}

/* Botanical subtle element on contact background */
.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    mask-image: radial-gradient(var(--card-bg), transparent);
    -webkit-mask-image: radial-gradient(white, transparent);
    opacity: 0.03;
    pointer-events: none;
    border-radius: 60px 60px 0 0;
}

.contact-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    background-color: var(--text-main);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(20, 42, 34, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(20, 42, 34, 0.25);
}

.contact-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
}

.contact-telegram {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.3rem 0.7rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(20, 42, 34, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(243, 244, 246, 0.95));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-main);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(20, 42, 34, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.telegram-icon {
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #229ed9;
    color: #fff;
    box-shadow: 0 6px 14px rgba(34, 158, 217, 0.35);
}

.telegram-icon svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.contact-telegram-text {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.contact-telegram:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(20, 42, 34, 0.12);
    border-color: rgba(34, 158, 217, 0.35);
}

.contact-telegram:hover .contact-telegram-text {
    color: var(--accent);
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    background-color: var(--card-bg);
    color: var(--text-muted);
    font-size: 0.95rem;
    border-top: 1px solid rgba(20, 42, 34, 0.05);
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-up {
    transform: translateY(40px);
    animation: slideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.3s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scroll Animations controlled by JS */
.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .about-grid {
        gap: 3rem;
    }

    .section-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .about-stats {
        flex-direction: column;
        gap: 2rem;
        padding: 2.5rem;
    }

    .nav-links {
        display: none;
        /* Fallback for mobile - in a real app, implement hamburger */
    }

    .nav-content {
        justify-content: center;
    }

    .btn-primary {
        padding: 1rem 2.5rem;
    }

    .contact-telegram {
        width: min(100%, 320px);
        justify-content: center;
    }

    .hero-image-wrapper {
        padding: 0 1rem;
    }
}
