   
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Theme variables. Default: light theme */
        :root {
            --bg: #f7f8fa;
            --text: #0b1115;
            --card-bg: #ffffff;
            --card-bg-2: #f3f6f8;
            --header-overlay-bg: rgba(255,255,255,0.55);
            --border: #e3eaef;
            --placeholder-bg: #eef3f6;
            --placeholder-border: #c9d6df;
            --placeholder-border-hover: #9fb7c9;
            --placeholder-text: #2b3a43;
            --accent: #8b0000;
            --muted: #5b6b74;
            --footer-bg: #f0f4f7;
        }

        /* Dark theme overrides */
        .theme-dark {
            --bg: #030507;
            --text: #e2eaf1;
            --card-bg: #0b0f13;
            --card-bg-2: #0f1921;
            --header-overlay-bg: rgba(11,15,19,0.45);
            --border: #19232b;
            --placeholder-bg: #131d26;
            --placeholder-border: #3f5568;
            --placeholder-border-hover: #5d83a8;
            --placeholder-text: #6987a2;
            --accent: #8b0000;
            --muted: #cde1f5;
            --footer-bg: #111f29;
        }

        body {
            background-color: var(--bg);
            font-family: 'Nunito', 'Inter', sans-serif;
            line-height: 1.5;
            color: var(--text);
            padding: 2rem 1.5rem;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        /* Smooth scrolling for anchor navigation */
        html { scroll-behavior: smooth; }

        /* sections used by header anchors */
        .section { padding: 3rem 0; scroll-margin-top: 96px; }

        /* Reviews styling */
        .reviews-summary { margin: 0.5rem 0 1rem 0; color: var(--muted); }
        .review-list { display: flex; flex-direction: column; gap: 1rem; }

        .review-card { display: flex; flex-direction: column; gap: 0.6rem; background: var(--card-bg-2); border: 1px solid var(--border); padding: 1rem; border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,0.04); }
        .review-stars { display: flex; flex-direction: row; gap: 6px; color: #f2b01e; font-size: 18px; line-height: 1; }
        .review-body { display: block; }
        .review-meta { font-weight: 700; margin-bottom: 0.4rem; }
        .review-text { margin: 0; color: var(--text); line-height: 1.45; }

        @media (min-width: 900px) {
            .review-card { flex: 1 1 0; }
        }

        /* small utility for the reviews update notice */
        .reviews-updated { font-size: 0.95rem; color: var(--muted); margin-top: 0.6rem; }

        .layout-last {
            max-width: 1500px;
            width: 1500px;
            background: var(--card-bg);
            border-radius: 40px;
            padding: 3rem;
            box-shadow: 0 25px 40px -15px rgba(0,0,0,0.12), inset 0 0 0 1px var(--border);
            border: 1px solid var(--border);
            @media (max-width: 850px) {
                width: 100%;
                padding: 2rem 1.5rem;
            }
        }

        .layout {
            max-width: 1500px;
            width: 100%;
            background: var(--card-bg);
            border-radius: 40px;
            

        /* Extra mobile safety: make CTA fill available width and never overflow */
            @media (max-width: 768px) {
            .cta-btn {
        width: 90%;
        height: 70px;
        font-size: 110%;
    }
}
            padding: 3rem;
            box-shadow: 0 25px 40px -15px rgba(0,0,0,0.12), inset 0 0 0 1px var(--border);
            border: 1px solid var(--border);
        }

        /* ЗАГОЛОВКИ С ИЕРАРХИЕЙ РАЗМЕРОВ — как в оригинале, от h1 до h6 */
        .title-h1 {
            font-size: 3.8rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            color: white;
            line-height: 1.1;
            margin-bottom: 0.75rem;
        }

       
       .h1-like { 
    font-size: 3.2rem; 
    font-weight: 400; 
    color: var(--text);
}

@media (max-width: 768px) {
    .h1-like {
        font-size: 2rem;
    }
}

        .h2-like { font-size: 2.0rem; font-weight: 100; color: var(--text); }
        .h3-like { font-size: 1.9rem; font-weight: 650; color: var(--text); }
        .h4-like { font-size: 1.65rem; font-weight: 600; color: var(--text); }
        .h5-like { font-size: 1.45rem; font-weight: 600; color: var(--text); }
        .h6-like { font-size: 1.25rem; font-weight: 600; color: var(--text); }

        /* контейнер для фото-плашки (профиль, иконка) */
        .image-placeholder {
            background: var(--placeholder-bg);
            background-image: repeating-linear-gradient(45deg, rgba(60, 100, 150, 0.04) 0px, rgba(60, 100, 150, 0.04) 5px, transparent 5px, transparent 15px);
            border: 2px dashed var(--placeholder-border);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--placeholder-text);
            font-weight: 500;
            font-size: 1rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            transition: 0.1s;
            box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
            font-family: 'Space Grotesk', sans-serif;
        }

        .image-placeholder:hover {
            background: linear-gradient(180deg, rgba(0,0,0,0.03), rgba(0,0,0,0.0));
            border-color: var(--placeholder-border-hover);
            color: var(--placeholder-text);
        }

        /* специальный размер для главного фото (профиль) */
        .profile-img {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: #101e28;
            border: 2px dashed #4d708b;
            margin-right: 1.5rem;
            flex-shrink: 0;
        }

        /* прямоугольные плейсхолдеры — для контента */
        .rect-img {
            border-radius: 16px;
            background: #0f1a22;
        }

        /* БЕСПЛАТНОЕ ЗАНЯТИЕ — как яркий акцент */
        .free-lesson-block {
            background: var(--card-bg-2);
            border-left: 12px solid var(--accent);
            padding: 1.4rem 2rem;
            margin: 2.2rem 0 2.5rem 0;
            border-radius: 0 30px 30px 0;
            font-size: 2rem;
            font-weight: 800;
            color: var(--text);
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 10px 0 rgba(0,0,0,0.04);
            border-bottom: 1px solid var(--border);
            border-top: 1px solid var(--border);
            letter-spacing: -0.01em;
        }

        /* текст внутри бесплатного блока */
        .free-text {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        /* малый плейсхолдер для иконки "занятие" */
        .free-img-placeholder {
            width: 54px;
            height: 54px;
            background: #1c3343;
            border-radius: 14px;
            border: 2px dashed #5e8db0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #7ca3c9;
            font-size: 0.8rem;
            font-weight: 600;
        }

        /* описание — действующий инженер */
        .engineer-tagline {
            font-size: 1.9rem;
            font-weight: 650;
            color: var(--muted);
            margin: 1.2rem 0 0.8rem 0;
            display: flex;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
            border-bottom: 1px solid var(--border);
            padding-bottom: 1.2rem;
        }

        /* второй плейсхолдер — маленькая картинка физика/математика */
        .subject-img {
            width: 70px;
            height: 70px;
            border-radius: 18px;
            background: #0f1e2a;
            border: 2px dashed #45677e;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #698fb2;
            font-size: 0.75rem;
        }

        /* список — классический */
        .feature-list {
            list-style: none;
            margin: 2rem 0 2.5rem 0;
        }
        

        .feature-list li {
            left: 10px;
            font-size: 1.3rem;
            padding: 0.8rem 0 0.8rem 2.3rem;
            position: relative;
            font-weight: 500;
            color: var(--text);
            border-bottom: 1px solid var(--border);
        }
        

        .feature-list li::before {
    
             content: "";
            position: absolute;
            left: -1.2rem;
            width: 30px;      /* размер */
            height: 30px;
            background-image: url('./pic/gal.svg');
            background-size: contain;
            background-repeat: no-repeat;
            
        }
         @media (max-width: 850px) {
        
            .feature-list li::before { width: 30px; height: 30px; left: -0.5rem; }}

        /* блок с именем и финальной плашкой */
        .signature-area {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 2rem;
            padding-top: 1.8rem;
            border-top: 3px solid #1e2e3b;
            flex-wrap: wrap;
            gap: 20px;
        }

        .name {
            font-size: 2.2rem;
            font-weight: 700;
            color: rgb(252, 255, 206);
            letter-spacing: -0.01em;
            display: flex;
            align-items: center;
            gap: 20px;
        }

        /* плейсхолдер под фото в подвале / логотип */
        .footer-img {
            width: 100px;
            height: 60px;
            background: var(--footer-bg);
            border-radius: 14px;
            border: 2px dashed var(--placeholder-border);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--placeholder-text);
            font-size: 0.8rem;
            font-weight: 600;
        }

        /* дополнительная зона для фото — вставим после списка, перед подписью */
        .photo-grid {
            display: flex;
            gap: 25px;
            margin: 30px 0 20px;
            flex-wrap: wrap;
        }

        .photo-item {
            flex: 1 1 160px;
            height: 150px;
            background: var(--card-bg-2);
            border-radius: 24px;
            border: 2px dashed var(--placeholder-border);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--placeholder-text);
            font-weight: 500;
            gap: 8px;
            text-transform: uppercase;
            font-size: 0.8rem;
            letter-spacing: 2px;
        }

        /* адаптивность */
        @media (max-width: 750px) {
            .layout { padding: 2rem 1.5rem; }
            .title-h1 { font-size: 2.8rem; }
            .h2-like { font-size: 1.8rem; }
            .h3-like { font-size: 1.6rem; }
            .h4-like { font-size: 1.4rem; }
            .h5-like { font-size: 1.25rem; }
            .h6-like { font-size: 1.1rem; }
            .free-lesson-block { font-size: 1.5rem; }
        }

        @media (max-width: 500px) {
            .hierarchy-row { gap: 1rem; }
        }

        /* микро-текст для плейсхолдера */
        .placeholder-icon {
            font-size: 2rem;
            opacity: 0.8;
            filter: drop-shadow(0 2px 2px black);
        }

        /* контейнер верхней части с фото профиля и заголовком */
        .top-header {
            display: flex;
            align-items: center;
            margin-bottom: 1rem;
            flex-wrap: wrap;
            
        }

        /* пустое поле под фото профиля (крупное) */
        .profile-img-large {
            width: 110px;
            height: 110px;
            border-radius: 50%;
            background: #101d29;
            border: 2.5px dashed #3d6685;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 1.8rem;
            color: #6f95ba;
            font-size: 0.8rem;
            flex-shrink: 0;
            text-align: center;
            padding: 0 5px;
        }

        /* полная свобода: все img-поля пустые, серые, с паттерном */
        .dashed-pattern {
            background: radial-gradient(circle at 30% 30%, #1e2e3a 2px, transparent 2px), #0f1a22;
            background-size: 15px 15px;
        }

        /* Links in the hierarchy should look like headings but be clickable */
        .hierarchy-row a.h2-like {
            text-decoration: none;
            color: inherit;
        }

        /* Photo links inside grid */
        .photo-item a.photo-link {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            color: inherit;
            text-decoration: none;
        }

        .photo-item img { max-width: 100%; height: auto; border-radius: 10px; }

        /* Footer link styling */
        .footer-link { display: inline-block; text-decoration: none; }

        /* Small hover affordance for clickable blocks */
        .photo-item:hover, .footer-link:hover, .hierarchy-row a.h2-like:hover {
            transform: translateY(-3px);
            transition: transform 0.12s ease-out;
        }

        .site-header {
            position: sticky;
            top: 0;
            z-index: 999;
            background: transparent;
            border-bottom: none;
            padding: 0.06rem 0; /* height reduced by ~50% */
            isolation: isolate;
            overflow: visible;
        }
        /* translucent blurred layer behind header content */
        .site-header::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 1;
            background: var(--header-overlay-bg);
            -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
            pointer-events: none;
        }
        .site-header .header-inner { position: relative; z-index: 2; }
        .site-header .header-inner {
            width: 90vw; /* shortened by 10% */
            margin-left: calc(50% - 45vw);
            margin-right: calc(50% - 45vw);
            padding: 0.175rem 0.45rem; /* vertical padding roughly halved */
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            background: var(--card-bg); /* theme-aware header background */
            border-radius: 24px; /* slightly smaller oval corners */
            box-shadow: 0 12px 20px -16px rgba(0,0,0,0.08), inset 0 0 0 1px var(--border);
            border: none;
        }
        .site-title h1 { font-size: 1.4rem; margin: 0; line-height: 1; color: var(--text); }
        .site-title .subtitle { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
        .site-title-link { text-decoration: none; color: inherit; }
        .site-flag {
            height: 56px;
            width: 56px;
            display: block;
            border-radius: 50%;
            overflow: hidden;
            object-fit: cover;
            border: 2px solid var(--border);
            box-shadow: 0 8px 18px rgba(0,0,0,0.08);
            background: var(--card-bg-2);
        }

        /* Header navigation layout: span nav to fill space */
        .site-header .hierarchy-row { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 6px; }
        .site-header .hierarchy-row a.h2-like { flex: 1 1 0; text-align: center; margin: 0 6px; border-radius: 12px; background: transparent; box-shadow: none; transition: all 0.12s ease; padding: 0.6rem 0.5rem; }
        .site-header .hierarchy-row a.h2-like.active { box-shadow: inset 0 8px 18px rgba(0,0,0,0.06); background: var(--card-bg-2); }

        /* Theme switch (slider) */
        .theme-toggle { margin-left: 12px; display: flex; align-items: center; }
        .theme-toggle .theme-toggle-input { position: absolute; left: -9999px; }
        .theme-switch {
            display: inline-block;
            width: 64px;
            height: 36px;
            background: var(--card-bg-2);
            border-radius: 36px;
            position: relative;
            border: 1px solid var(--border);
            box-shadow: inset 0 2px 6px rgba(0,0,0,0.03);
            cursor: pointer;
        }
        .theme-switch .switch-knob {
            position: absolute;
            top: 4px;
            left: 4px;
            width: 28px;
            height: 28px;
            background: var(--card-bg);
            border-radius: 50%;
            transition: transform 0.18s ease, background 0.18s ease;
            box-shadow: 0 3px 8px rgba(0,0,0,0.12);
        }
        .theme-toggle-input:checked + .theme-switch { background: var(--accent); }
        .theme-toggle-input:checked + .theme-switch .switch-knob { transform: translateX(28px); background: #fff; }

        /* Telegram icon in header */
        .telegram-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            color: var(--accent);
            text-decoration: none;
            transition: transform 0.12s ease, color 0.12s ease;
        }
        .telegram-link:hover { transform: translateY(-2px); color: #0098ff; }
        
        .phone-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            color: var(--accent);
            text-decoration: none;
            transition: transform 0.12s ease, color 0.12s ease;
        }
        .phone-link:hover { transform: translateY(-2px); color: #02016b; }
        .gal {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            color: var(--accent);
            text-decoration: none;
            transition: transform 0.12s ease, color 0.12s ease;
        }
        .whatsapp-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            color: var(--accent);
            text-decoration: none;
            transition: transform 0.12s ease, color 0.12s ease;
        }
        .whatsapp-link:hover { transform: translateY(-2px); color: #25D366; }

        .header-icons { display: flex; align-items: center; gap: 8px; }

        .telegram-icon { width: 40px; height: 40px; display: inline-block; }
        .whatsapp-icon { width: 40px; height: 40px; display: inline-block; }
        .phone-icon { width: 40px; height: 40px; display: inline-block;  }

        .free-lesson-link { text-decoration: none; color: inherit; display: block; }
        .free-lesson-link .free-lesson-block { transition: transform 0.12s ease, box-shadow 0.12s ease; }
        .free-lesson-link:hover .free-lesson-block { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(0,0,0,0.08); }

        /* external telegram svg styling */
        .telegram-icon { width: 40px; height: 40px; display: inline-block; }

        /* keep layout content a bit lower so header doesn't overlap */
        .layout { margin-top: 0.6rem; }

        /* Move the whole layout upward by 40% to reduce empty space above */
        .layout { transform: translateY(-1%); }

        /* --- Media rows: image left, styled text card right --- */
        .media-rows { display: flex; flex-direction: column; gap: 2.4rem; margin: 2rem 0; }

        .media-row { display: flex; align-items: flex-start; gap: 1.8rem; width: 100%; }
        /* Left column grouping for stacked text blocks */
        .media-left { flex: 0 0 90%; display: flex; flex-direction: column; gap: 1rem; }
        .media-right { flex: 0 0 50%; display: flex; align-items: center; justify-content: center; }

        /* Image occupies fixed half of the row; text occupies the other half.
           Text length will not change the image width. */
        

        
        .media-img {
            background: #000000;
            background: linear-gradient(0deg, rgba(0, 0, 0, 1) 0%, rgba(184, 184, 184, 1) 0%, rgba(250, 250, 250, 1) 100%);
            width: 40%;
            max-width: 40%;
            flex: 0 0 40%; /* do not grow or shrink */
            height: auto; /* preserve intrinsic height */
            object-fit: contain;
            border-radius: 12px;
            box-shadow: 0 10px 24px rgba(0,0,0,0.06);
            display: block;
            align-self: flex-start;
        }

        .media-text {
          
            flex: 1 1 70%;
            transform: translateX(-1%);
            max-width: 70%;
            background: var(--card-bg-2);
            border: 1px solid var(--border);
            padding: 1.4rem 1.6rem;
            border-radius: 12px;
            box-shadow: 0 8px 20px rgba(0,0,0,0.04);
            color: var(--text);
            box-sizing: border-box;
            overflow-wrap: break-word;
        }

        .media-text h3 { margin: 0 0 0.6rem 0; font-size: 1.6rem; font-weight: 700; }
        .media-text p { margin: 0; color: var(--muted); line-height: 1.45; }

        /* Highlight ALL‑CAPS phrases inside media text */
        .media-text .caps { color: #8b0000; font-weight: 800; }

        /* CTA button style for the first media block */
        
        .cta-wrapper { margin-top: 0.6rem; }
        .cta-btn {
            
            display: flex;
            transform: translateX(-1%);
            justify-content: center; 
            align-items: center;     
            width: 883px;
            height: 100px;
            background: #8b0000;
            color: #ffffff;
            text-decoration: none;
            padding: 0.85rem 1.2rem;
            border-radius: 12px;
            font-weight: 900;
            font-size: 180%;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        }
        .cta-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }

        /* Mobile: stack image above text */
        @media (max-width: 850px) {
            .media-row { flex-direction: column; }
            .media-img { width: 100%; max-width: 100%; }
            .media-text { width: 100%; max-width: none; margin: 0; box-sizing: border-box; align-self: stretch; }

            /* Ensure left/right columns and text blocks fit inside .layout on mobile */
            .media-left, .media-right { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; }
            .media-left { padding-left: 0; padding-right: 0; }
            .media-right { padding-left: 0.5rem; padding-right: 0.5rem; }
            .media-text { padding-left: 0.6rem; padding-right: 0.6rem; }
            .cta-wrapper { padding-left: 0.4rem; padding-right: 0.4rem; }

            /* hide header navigation tabs on small screens */
            .site-header .hierarchy-row { display: none; }

            /* move header icons to the right and scale them up 5% */
            .header-icons { margin-left: auto; }
            .telegram-icon, .whatsapp-icon { width: 42px; height: 42px; margin: 10px; }
            
        }

        /* Limit general body paragraphs to half of the layout width on wide screens */
        .layout p {
            max-width: 50%;
        }

        @media (max-width: 900px) {
            .layout p { max-width: 100%; }
        }

        /* Desktop: shift the highlighted image 30% toward center */
        @media (min-width: 851px) {
            .media-img.shift-center { transform: translateX(-71.8%) translateY(11%); transition: transform 0.22s ease; position: relative; z-index: 2; }
        }
        .btn {
    display: inline-flex;
    padding: 10px 20px;
    justify-content: center; 
    align-items: center;  
    background:#8b0000;
    color: white;
    border: none;
    text-decoration: none;
    border-radius: 6px;
    
}
   .tgbtn {
    display: inline-flex;
    width: 250px;
    padding: 10px 20px;
    justify-content: center; 
    align-items: center;  
    background: rgb(32, 160, 225);
    color: white;
    border: none;
    text-decoration: none;
    border-radius: 6px;
    
}
.wabtn {
    display: inline-flex;
    width: 250px;
    padding: 10px 20px;
    justify-content: center; 
    align-items: center;  
    background:rgb(64, 195, 81);
    color: white;
    border: none;
    text-decoration: none;
    border-radius: 6px;
    
    
}
.phbtn {
    display: inline-flex;
    width: 250px;
    padding: 10px 20px;
    justify-content: center; 
    align-items: center;  
    background:rgb(148, 148, 148);
    color: white;
    border: none;
    text-decoration: none;
    border-radius: 6px;
    
    
}
@media (max-width: 850px) {
    .tgbtn, .wabtn, .phbtn { width: 100%;height: 70%; max-width: 100% !important; display: block; display: flex;
    flex-direction: column; gap: 10px;display: flex; margin-bottom: 10px; }
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }
.tgbtn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }
.wabtn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }
.phbtn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }

.btn-secondary {
    background: gray;
}


.image-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    color: white;
    font-size: 24px;
    font-weight: bold;
}
