/* ========== RESET & TOKENS ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* nature-inspired soft palette */
    --bg:           #DCE0CC;   /* основной шалфейный фон */
    --bg-soft:      #E7EAD8;   /* чуть светлее */
    --bg-warm:      #F5F1E8;   /* кремовый */
    --surface:      #FFFFFFCC; /* стеклянная карточка */
    --surface-2:    #F0EFE3;

    --accent:       #4A5D3F;   /* тёмно-зелёный */
    --accent-2:     #5C6F4E;
    --accent-soft:  #8FA886;
    --accent-mute:  #B5C2A1;

    --text:         #2E3528;   /* почти-чёрный с оливковым подтоном */
    --text-2:       #5A6354;
    --text-muted:   #8A9183;
    --slate:        #4A5468;   /* как "Web Dev" на фото */

    --line:         #C9CFB6;
    --shadow:       0 20px 60px -20px rgba(74, 93, 63, 0.25);
    --shadow-sm:    0 4px 20px -8px rgba(74, 93, 63, 0.2);

    --radius:       20px;
    --radius-sm:    12px;
    --radius-lg:    32px;

    --ease:         cubic-bezier(0.65, 0, 0.35, 1);
    --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.45s var(--ease), color 0.45s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ========== REVEAL ON SCROLL ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
}
.btn--primary {
    z-index: 2;
    background: var(--accent);
    color: var(--bg-warm);
}
.btn--primary:hover {
    background: var(--accent-2);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px var(--accent);
}
.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--line);
}
.btn--ghost:hover {
    background: var(--surface-2);
    border-color: var(--accent-soft);
    transform: translateY(-2px);
}
.btn--lg { padding: 16px 28px; font-size: 15px; }

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 18px 0;
    transition: all 0.4s var(--ease);
}
.header.is-scrolled {
    padding: 12px 0;
    background: rgba(220, 224, 204, 0.7);
    border-radius: 0 0 30px 30px;
    box-shadow: 0px 3px 20px rgba(74, 93, 63, 0.12);
}

.header.is-scrolled::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0 0 30px 30px;
    backdrop-filter: blur(6px);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    color: var(--text);
    transition: transform 0.3s var(--ease);
}
.logo:hover { transform: scale(1.03); }
.logo__mark {
    width: 36px; height: 36px;
    color: var(--accent);
    animation: spin 18s linear infinite;
}
.logo__text { font-size: 18px; }
.logo__text em {
    color: var(--accent);
    font-style: normal;
    font-weight: 400;
}

.header__logo {
    min-width: 36px;
    height: 36px;
}

.nav__list {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 999px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.nav__link {
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    border-radius: 999px;
    transition: all 0.25s var(--ease);
    position: relative;
}
.nav__link:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.6);
}
.nav__link.is-active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.7);
}

.burger {
    z-index: 2;
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.burger span {
    width: 24px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========== THEME TOGGLE ========== */
.theme-toggle {
    --tt-h: 34px;
    --tt-w: 94px;
    --tt-pad: 3px;
    --tt-thumb: calc(var(--tt-h) - var(--tt-pad) * 2);
    --tt-shift: calc(var(--tt-w) - var(--tt-h));

    width: var(--tt-w);
    height: var(--tt-h);
    padding: 0;
    border: 0;
    background: none;
    border-radius: 999px;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle {
    outline: 2px solid transparent;
    outline-offset: 3px;
    transition: outline-color 0.4s var(--ease);
}
.theme-toggle:focus-visible {
    outline-color: var(--accent-soft);
    border-radius: 999px;
}

.theme-toggle__track {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    box-shadow:
        inset 0 1px 2px rgba(46, 53, 40, 0.08),
        inset 0 -1px 0 rgba(255, 255, 255, 0.55),
        0 1px 3px rgba(74, 93, 63, 0.12);
    transition: box-shadow 0.55s var(--ease);
}

/* Dark-mode gradient sits on a pseudo so it can cross-fade smoothly
   (CSS can't interpolate between two linear-gradient backgrounds). */
.theme-toggle__track::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, #2C342B 0%, #1B211D 100%);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.45),
        inset 0 -1px 0 rgba(143, 168, 134, 0.15);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.55s var(--ease);
}

[data-theme="dark"] .theme-toggle__track::before {
    opacity: 1;
}

.theme-toggle__dim {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    pointer-events: none;
    z-index: 2;
    background-image: 
        linear-gradient(90deg, rgb(0 0 0) 0%, 
        #00000000 42%, 
        #00000000 58%, 
        rgb(74 93 63) 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    transition: background-position 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.theme-toggle__icon {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.4s var(--ease), filter 0.5s var(--ease);
}
.theme-toggle__icon--sun  { left: 7px; }
.theme-toggle__icon--moon { right: 7px; opacity: 0.75; }

.theme-toggle__thumb {
    position: absolute;
    top: var(--tt-pad);
    left: var(--tt-pad);
    width: var(--tt-thumb);
    height: var(--tt-thumb);
    border-radius: 50%;
    box-shadow:
        0 3px 7px rgba(46, 53, 40, 0.28),
        0 1px 2px rgba(46, 53, 40, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    z-index: 3;
    transition:
        transform 0.55s cubic-bezier(0.68, -0.35, 0.27, 1.4),
        background 0.5s var(--ease),
        box-shadow 0.4s var(--ease);
}

.theme-toggle:hover .theme-toggle__thumb {
    box-shadow:
        0 5px 12px rgba(46, 53, 40, 0.32),
        0 1px 2px rgba(46, 53, 40, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.theme-toggle:active .theme-toggle__thumb {
    transform: scale(0.94);
}

/* ===== Dark state for the toggle itself ===== */
[data-theme="dark"] .theme-toggle__track {
    /* keep inner highlights (covered by ::before anyway) so the shadow array
       length matches the light state and box-shadow can interpolate smoothly */
    box-shadow:
        inset 0 1px 2px rgba(46, 53, 40, 0.08),
        inset 0 -1px 0 rgba(255, 255, 255, 0.55),
        0 1px 3px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .theme-toggle__dim {
    background-position: 0% 0;
}
[data-theme="dark"] .theme-toggle__thumb {
    transform: translateX(var(--tt-shift));
    box-shadow:
        0 3px 9px rgba(0, 0, 0, 0.45),
        0 1px 2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] .theme-toggle:active .theme-toggle__thumb {
    transform: translateX(var(--tt-shift)) scale(0.94);
}
[data-theme="dark"] .theme-toggle__icon--sun  { opacity: 0.6; }
[data-theme="dark"] .theme-toggle__icon--moon {
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* ========== LANGUAGE SWITCHER ========== */
.lang-switcher {
    position: relative;
    flex-shrink: 0;
}

.lang-switcher__trigger {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 7px 16px 7px 8px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.55),
        rgba(255, 255, 255, 0.25));
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-radius: 999px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    box-shadow:
        0 6px 18px -10px rgba(74, 93, 63, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transition:
        background 0.3s var(--ease),
        border-color 0.3s var(--ease),
        box-shadow 0.3s var(--ease),
        transform 0.3s var(--ease);
}
.lang-switcher__trigger:hover {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.7),
        rgba(255, 255, 255, 0.4));
    transform: translateY(-1px);
    box-shadow:
        0 10px 24px -10px rgba(74, 93, 63, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.lang-switcher__trigger:focus-visible {
    outline: 2px solid var(--accent-soft);
    outline-offset: 3px;
}

.lang-switcher__globe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.lang-switcher__globe img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lang-switcher__label {
    line-height: 1;
}

.lang-switcher__chev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 9px;
    flex-shrink: 0;
    transition: transform 0.35s var(--ease);
}
.lang-switcher__chev img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.lang-switcher.is-open .lang-switcher__chev {
    transform: rotate(180deg);
}

.lang-switcher__menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.55),
        rgba(255, 255, 255, 0.28));
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    border-radius: 22px;
    box-shadow:
        0 20px 50px -20px rgba(74, 93, 63, 0.35),
        0 8px 24px -10px rgba(74, 93, 63, 0.18),
        inset 0.7px 0.7px 0 rgba(255, 255, 255, 0.8);

    /* closed state */
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    transform-origin: top right;
    pointer-events: none;
    visibility: hidden;
    transition:
        opacity 0.3s var(--ease),
        transform 0.3s var(--ease-out),
        visibility 0s linear 0.3s;
    z-index: 50;
}
.lang-switcher.is-open .lang-switcher__menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
    transition:
        opacity 0.3s var(--ease),
        transform 0.4s var(--ease-out),
        visibility 0s linear 0s;
}

.lang-switcher__option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 8px 14px 8px 8px;
    background: transparent;
    border-radius: 14px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    transition:
        background 0.25s var(--ease),
        transform 0.25s var(--ease);
}
.lang-switcher__option:hover {
    background: rgba(255, 255, 255, 0.55);
}
.lang-switcher__option.is-active {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.85),
        rgba(255, 255, 255, 0.55));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 4px 12px -6px rgba(74, 93, 63, 0.18);
}

.lang-switcher__flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 28px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow:
        0 2px 6px -2px rgba(46, 53, 40, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.lang-switcher__flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== HERO ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}
.hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(143, 168, 134, 0.3), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(168, 180, 200, 0.25), transparent 50%),
        var(--bg);
    z-index: -1;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(143, 168, 134, 0.3);
    border-radius: 999px;
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 24px;
}
.hero__badge-dot {
    width: 8px; height: 8px;
    background: var(--accent-soft);
    border-radius: 50%;
    animation: pulse 2s var(--ease) infinite;
    box-shadow: 0 0 0 0 rgba(143, 168, 134, 0.7);
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0   rgba(143, 168, 134, 0.6); }
    70%  { box-shadow: 0 0 0 12px rgba(143, 168, 134, 0); }
    100% { box-shadow: 0 0 0 0   rgba(143, 168, 134, 0); }
}

.hero__title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(36px, 5.5vw, 68px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 24px;
}
.hero__title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__subtitle {
    font-size: 18px;
    color: var(--text-2);
    max-width: 520px;
    margin-bottom: 36px;
}

.hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.hero__stats {
    display: flex;
    gap: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}
.hero__stat-num {
    font-family: 'Unbounded', sans-serif;
    font-size: 36px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 6px;
}
.hero__stat-label {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* ===== HERO VISUAL: 3D CODE EDITOR ===== */
.hero__visual {
    width: 100%;
    position: relative;
}
.orb {
    position: relative;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1600px;
    animation: float 6s ease-in-out infinite;
}

/* Editor window */
.editor {
    position: relative;
    width: 100%;
    height: 360px;
    border-radius: 16px;
    overflow: hidden;
    background:
        linear-gradient(160deg, #2E3A2A 0%, #1F2A1C 100%);
    transform: rotateY(-14deg) rotateX(8deg) rotateZ(-1.5deg);
    transform-style: preserve-3d;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    box-shadow:
        32px 42px 80px -18px rgba(46, 53, 40, 0.58),
        16px 26px 48px -14px rgba(46, 53, 40, 0.40),
        4px 10px 18px -6px rgba(46, 53, 40, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04),
        inset -2px -3px 14px rgba(0, 0, 0, 0.35);
}
.editor.is-tracking { transition: transform 0.12s ease-out; }
/* soft glow behind the editor */
.editor__glow {
    position: absolute;
    inset: -40px -20px -50px -40px;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 50% at 30% 50%, rgba(143, 168, 134, 0.45), transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 90%, rgba(168, 180, 200, 0.30), transparent 70%);
    filter: blur(18px);
    pointer-events: none;
}

/* Title bar */
.editor__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.015));
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.editor__dots { display: flex; gap: 6px; }
.editor__dots span {
    width: 11px; height: 11px;
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 2px rgba(0,0,0,0.25);
}
.editor__dots span:nth-child(1) { background: #E27272; }
.editor__dots span:nth-child(2) { background: #E2C572; }
.editor__dots span:nth-child(3) { background: #8FA886; }

.editor__tab {
    margin-left: 12px;
    padding: 5px 11px;
    border-radius: 7px;
    background: rgba(255,255,255,0.06);
    color: #C9CFB6;
    font-size: 11px;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.editor__tab svg { color: #8FA886; }

.editor__actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}
.editor__actions span {
    width: 14px; height: 2px;
    background: rgba(255,255,255,0.18);
    border-radius: 2px;
}
.editor__actions span:last-child { width: 8px; }

/* Code area */
.editor__body {
    padding: 18px 0 20px;
    font-size: 14px;
    line-height: 1.9;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(143, 168, 134, 0.06), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,0.01), transparent 30%);
}
.editor__line {
    display: flex;
    align-items: baseline;
    padding: 0 18px 0 0;
    color: #DDE2D0;
    white-space: nowrap;
    overflow: hidden;
}
.editor__num {
    flex-shrink: 0;
    display: inline-block;
    width: 34px;
    text-align: right;
    margin-right: 16px;
    color: rgba(255,255,255,0.22);
    user-select: none;
    font-size: 12px;
}
.editor__line--blank { height: 1.9em; }

/* Syntax tokens */
.c-kw    { color: #E2A672; }
.c-var   { color: #A8B4C8; }
.c-prop  { color: #DDE2D0; }
.c-str   { color: #B5C2A1; }
.c-fn    { color: #E2C572; }
.c-ok    { color: #8FA886; font-weight: 700; }
.c-prompt {
    color: #8FA886;
    font-weight: 700;
    margin-right: 2px;
}
.editor__line--out {
    color: rgba(221, 226, 208, 0.55);
    font-style: italic;
    transition: opacity 0.35s ease;
}
.editor__line--out.is-hidden { opacity: 0; }

/* Typing line (JS-driven) */
.editor__typing {
    display: inline-block;
    white-space: pre;
    vertical-align: baseline;
    color: #DDE2D0;
}
.editor__caret {
    display: inline-block;
    width: 9px;
    height: 1.05em;
    background: #8FA886;
    margin-left: 2px;
    vertical-align: text-bottom;
    border-radius: 1px;
    animation: editor-caret 0.85s step-end infinite;
}
@keyframes editor-caret {
    0%, 50%      { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

/* ===== CHIPS (floating around editor) ===== */
.orb__chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 8px 8px 8px 18px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.60),
        rgba(255, 255, 255, 0.28));
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    box-shadow:
        0 18px 38px -12px rgba(46, 53, 40, 0.45),
        0 6px 14px -6px rgba(46, 53, 40, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        inset 0 -1px 0 rgba(255, 255, 255, 0.20);
    animation: float-chip 4s ease-in-out infinite;
    z-index: 2;
}
.orb__chip-icon {
    width: 28px;
    height: 28px;
    padding: 2px;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Unbounded', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #B89D2C;
}
.orb__chip-icon--js { background: #F0DB4F; }
.orb__chip--1 { top: 2%;   left: -10px;  animation-delay: 0s; }
.orb__chip--2 { top: 22%;  right: -20px; animation-delay: 1s; }
.orb__chip--3 { bottom: 18%; left: -28px; animation-delay: 2s; }
.orb__chip--4 { bottom: 4%;  right: 4px;  animation-delay: 3s; }

.orb__chip--4 img, .orb__chip--3 img {
    padding: 4px;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-18px); }
}
@keyframes float-chip {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

.hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}
.hero__scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    position: relative;
    overflow: hidden;
}
.hero__scroll-line::after {
    content: '';
    position: absolute;
    top: -50%; left: 0;
    width: 100%; height: 50%;
    background: var(--accent);
    animation: scroll-line 2s var(--ease) infinite;
}
@keyframes scroll-line {
    0%   { top: -50%; }
    100% { top: 100%; }
}

/* ========== SECTIONS ========== */
.section {
    padding: 120px 0;
    position: relative;
}
.section__head {
    max-width: 700px;
    margin: 0 auto 64px;
    text-align: center;
}
.section__tag {
    display: inline-block;
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding: 6px 14px;
    background: rgba(143, 168, 134, 0.15);
    border-radius: 999px;
}
.section__title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 18px;
}
.section__title em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}
.section__desc {
    font-size: 17px;
    color: var(--text-2);
}

/* ========== SKILLS ========== */
.skills {
    background:
        linear-gradient(135deg,
            rgba(245, 241, 232, 0.82),
            rgba(216, 220, 200, 0.9) 60%,
            rgba(168, 180, 200, 0.85)),
        url('img/skills-bg.jpg') center/cover no-repeat fixed;
    position: relative;
}
.skills::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(143, 168, 134, 0.25), transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 100%, rgba(168, 180, 200, 0.30), transparent 60%);
    pointer-events: none;
}
.skills .container { position: relative; z-index: 1; }
.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    perspective: 1400px;
}
.skill {
    /* glass */
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.55),
        rgba(255, 255, 255, 0.2));
    backdrop-filter: blur(5px) saturate(150%);
    -webkit-backdrop-filter: blur(5px) saturate(150%);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow:
        0 8px 30px -12px rgba(74, 93, 63, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.45s var(--ease),
                border-color 0.45s var(--ease);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}
.skill.is-tilting { transition: transform 0.12s ease-out, box-shadow 0.3s var(--ease); }
.skill::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.25),
        transparent);
    pointer-events: none;
    border-radius: var(--radius) var(--radius) 0 0;
}
.skill:hover {
    box-shadow:
        0 25px 50px -15px rgba(74, 93, 63, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.85);
}
.skill__top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    position: relative;
}
.skill__icon {
    width: 50px; 
    height: 50px;
    padding: 4px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Unbounded', sans-serif;
    font-weight: 600;
    color: white;
    font-size: 20px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.skill:first-child .skill__icon {
    padding-left: 5px;
    padding-top: 7px;
}

.skill:first-child .skill__icon img {
    width: 29px;
}

.skill__icon--img {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 4px 12px -4px rgba(74, 93, 63, 0.15);
    padding: 6px;
}
.skill__icon--img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.skill__info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.skill__name {
    font-weight: 600;
    font-size: 16px;
}
.skill__level {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}
.skill__bar {
    width: 100%;
    height: 8px;
    background: rgba(74, 93, 63, 0.1);
    border-radius: 999px;
    overflow: hidden;
}
.skill__bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    border-radius: 999px;
    transition: width 1.4s var(--ease-out);
}

/* ========== ABOUT ========== */
.about__inner {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
    align-items: center;
}
.about__visual {
    position: relative;
    height: 520px;
    perspective: 1400px;
}
.about__card {
    position: absolute;
    /* glass */
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.6),
        rgba(255, 255, 255, 0.25));
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-radius: var(--radius);
    box-shadow:
        0 20px 50px -20px rgba(74, 93, 63, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.5s var(--ease);
}
.about__card--main {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    padding: 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg-warm);
    box-shadow: 0px 7px 25px 6px var(--accent);
    text-align: center;
    z-index: 2;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.about__card--main.is-tilting { transition: transform 0.12s ease-out; }
.about__avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(245, 241, 232, 0.15);
    margin: 0 auto 16px;
    overflow: hidden;
    border: 1px solid rgba(245, 241, 232, 0.3);
}
.about__avatar svg { width: 100%; height: 100%; }
.about__name {
    display: block;
    font-family: 'Unbounded', sans-serif;
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 4px;
}
.about__role {
    display: block;
    font-size: 12px;
    opacity: 0.7;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.about__card--mini {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 160px;
}
.about__mini-icon--img {
    width: 50px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.about__mini-icon--img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.about__card--mini-1 {
    top: 5%;
    right: 0;
    animation: float 5s ease-in-out infinite;
}
.about__card--mini-2 {
    bottom: 18%;
    left: 0;
    animation: float 5s ease-in-out infinite 1.5s;
}
.about__card--mini-3 {
    bottom: 0;
    right: 5%;
    animation: float 5s ease-in-out infinite 3s;
}
.about__mini-num {
    font-family: 'Unbounded', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--accent);
}
.about__mini-icon {
    font-size: 24px;
}
.about__mini-text {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.3;
}

.about__lead {
    font-size: 19px;
    color: var(--text);
    margin: 24px 0 20px;
    line-height: 1.6;
}
.about__lead strong { color: var(--accent); font-weight: 600; }
.about__text {
    color: var(--text-2);
    margin-bottom: 16px;
}
.about__text strong { color: var(--accent); }

.about__features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 32px;
}
.about__feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-2);
}
.about__feature-icon {
    width: 24px; height: 24px;
    background: var(--accent);
    color: var(--bg-warm);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ========== PROJECTS ========== */
.projects { background: var(--bg-soft); }
.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}
.project {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.5s var(--ease);
    display: flex;
    flex-direction: column;
}
.project:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: var(--accent-soft);
}
.project__img {
    height: 220px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.project__img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.25), transparent 60%);
}
.project__img-text {
    position: relative;
    font-family: 'Unbounded', sans-serif;
    font-size: 32px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
    transition: transform 0.5s var(--ease);
}
.project:hover .project__img-text {
    transform: scale(1.1);
}
.project__img--video {
    background: #000;
}
.project__img--video::before {
    display: none;
}
.project__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease);
}
.project:hover .project__video {
    transform: scale(1.05);
}
.project__body {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.project__tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.project__tags span {
    padding: 4px 12px;
    background: rgba(143, 168, 134, 0.15);
    color: var(--accent);
    font-size: 12px;
    border-radius: 999px;
    font-weight: 500;
}
.project__title {
    font-family: 'Unbounded', sans-serif;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.3;
}
.project__desc {
    color: var(--text-2);
    font-size: 15px;
    margin-bottom: 20px;
    flex: 1;
}
.project__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    align-self: flex-start;
    transition: gap 0.3s var(--ease);
}
.project__link:hover { gap: 12px; }

/* ========== REVIEWS ========== */
.reviews__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    perspective: 1400px;
}
.review {
    position: relative;
    background: var(--surface);
    backdrop-filter: blur(10px);
    padding: 36px 28px 28px;
    border-radius: var(--radius);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s var(--ease),
                border-color 0.4s var(--ease);
    transform-style: preserve-3d;
    will-change: transform;
}
.review:hover {
    box-shadow: var(--shadow);
}
.review.is-tilting { transition: transform 0.12s ease-out, box-shadow 0.3s var(--ease); }
.review__quote {
    position: absolute;
    top: -10px;
    left: 24px;
    font-family: 'Unbounded', sans-serif;
    font-size: 80px;
    line-height: 1;
    color: var(--accent-soft);
    opacity: 0.4;
    font-weight: 700;
}
.review__text {
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
    position: relative;
}
.review__author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
.review__avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-warm);
    font-weight: 600;
    font-size: 18px;
    font-family: 'Unbounded', sans-serif;
}
.review__name {
    font-weight: 600;
    font-size: 15px;
}
.review__role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== CONTACTS (по макету: 3D-орб + Web Dev) ========== */
.contacts {
    /* заметно светлее/теплее, чем reviews (--bg), плюс прожектор под орбом */
    background:
        radial-gradient(ellipse 70% 55% at 50% 32%, #ECEEDA 0%, transparent 70%),
        linear-gradient(180deg, #E4E7D2 0%, #DEE2CB 100%);
    padding: 80px 0 40px;
    overflow: hidden;
    border-top: 1px solid rgba(143, 168, 134, 0.18);
}
.contacts__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 0 0;
}

/* сцена с орбом и кнопкой по центру */
.contacts__stage {
    position: relative;
    width: min(420px, 80vw);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 7s ease-in-out infinite;
}
.contacts__orb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* мягкая тень-свечение под объектом */
    filter: drop-shadow(0px 0px 80px rgba(74, 93, 63, 0.75));
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.contacts__btn {
    position: absolute;
    width: 235px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    /* стеклянная тёмно-зелёная пилюля как на макете */
    background: rgba(74, 93, 63, 0.42);
    backdrop-filter: blur(5px) saturate(150%);
    color: var(--bg-warm);
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease-in-out;
    white-space: nowrap;
}
.contacts__btn:hover {
    background: rgba(74, 93, 63, 0.6);
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.contacts__btn-icon {
    width: 20px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

/* большой пастельный заголовок снизу */
.contacts__title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(90px, 22vw, 170px);
    font-weight: 300;
    color: var(--slate);
    line-height: 0.9;
    letter-spacing: -0.05em;
    margin-top: 50px;
    text-align: center;
    opacity: 0.85;
    width: 100%;
    /* текст уходит «за край», как на макете */
    white-space: nowrap;
}

/* контакт-кнопки под заголовком */
.contacts__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin: 24px 0 56px;
}
.contacts__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    /* стеклянная светлая пилюля */
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.7),
        rgba(255, 255, 255, 0.35));
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    box-shadow:
        0 8px 22px -10px rgba(74, 93, 63, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease-in-out;
}
.contacts__link:hover {
    background: var(--accent);
    color: var(--bg-warm);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -10px var(--accent);
}
.contacts__link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: color 0.2s ease-in-out;
}
.contacts__link:hover .contacts__link-icon { color: var(--bg-warm); }

/* мини-подвал внутри секции (заменяет старый footer) */
.contacts__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 32px 0;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: 13px;
    flex-wrap: wrap;
    gap: 12px;
}
.contacts__top-link {
    color: var(--accent);
    font-weight: 600;
    transition: color 0.3s var(--ease);
}
.contacts__top-link:hover { color: var(--accent-2); }

[data-theme="dark"] .nav__list {
    background: rgba(30, 36, 32, 0.5);
    border-color: rgba(143, 168, 134, 0.18);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1240px) {
    .burger { display: flex; }
    .header__cta { display: none; }
    .header.header-nav-open {
        backdrop-filter: none;
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 30%;
        min-width: 280px;
        background: var(--bg);
        padding: 100px 28px 32px;
        z-index: 100;
        transform: translateX(-100%);
        transition: all 0.45s var(--ease);
        overflow-y: auto;
        box-shadow: 4px 0 40px rgba(46, 53, 40, 0.18);
        visibility: hidden;
    }
    .nav.is-mobile-open {
        transform: translateX(0);
        visibility: visible;
    }
    .nav .nav__list {
        flex-direction: column;
        background: unset;
        border: none;
        padding: 0;
        gap: 20px;
    }
    .nav__link {
        font-size: 22px;
        font-family: 'Unbounded', sans-serif;
    }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.45s var(--ease);
        z-index: 90;
    }
    .nav-backdrop.is-active {
        opacity: 1;
        pointer-events: auto;
    }

    .hero,
    .section {
        transition: transform 0.5s var(--ease);
    }
    body.menu-open .hero,
    body.menu-open .section {
        transform: translateX(60px);
    }
}

@media (max-width: 1024px) {
    .hero__inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hero__visual { 
        display: flex;
        justify-content: center;
        align-items: center;
        order: -1; 
    }
    .orb { width: 460px; height: 420px; }
    .editor { width: 400px; transform: rotateY(-10deg) rotateX(6deg) rotateZ(-1deg); }
    .editor__body { font-size: 13px; line-height: 1.85; }
    .hero__stats { justify-content: center; }
    .hero__actions { justify-content: center; }
    .hero__subtitle { margin-left: auto; margin-right: auto; }
    .about__inner { grid-template-columns: 1fr; gap: 60px; }
    .about__visual { width: 100%; margin: 0 auto; height: 460px; }
    .contacts__title {
        font-size: 90px;
    }
    .contacts__stage {
        width: min(320px, 80vw);
    }

    .editor {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .section { padding: 80px 0; }
    .hero { padding: 100px 0 60px; }
    .hero__stats { gap: 28px; }
    .hero__stat-num { font-size: 28px; }
    .about__features { grid-template-columns: 1fr; }
    .contacts__btn { 
        width: 185px;
        padding: 12px 0; 
        font-size: 12px; 
        letter-spacing: 0.08em; 
    }
    .contacts__links { gap: 10px; margin: 18px 0 40px; }
    .contacts__link { padding: 12px 18px; font-size: 13px; }
    .contacts__bottom { padding: 18px 20px 0; flex-direction: column; text-align: center; }
    .hero__scroll { display: none; }

    .lang-switcher__trigger {
        padding: 6px 10px 6px 6px;
        gap: 6px;
    }
    .lang-switcher__label { display: none; }
    .lang-switcher__globe { width: 24px; height: 24px; }
    .lang-switcher__menu {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .hero__title { font-size: 36px; }
    .section__title { font-size: 30px; }
    .hero__stats { flex-wrap: wrap; gap: 20px; }
    .orb { width: 320px; height: 340px; }
    .editor { width: 300px; transform: rotateY(-8deg) rotateX(4deg); }
    .editor__body { font-size: 11px; line-height: 1.75; padding: 12px 0; }
    .editor__num { width: 26px; margin-right: 10px; font-size: 10px; }
    .editor__caret { width: 7px; }
    .orb__chip { font-size: 11px; padding: 6px 6px 6px 12px; }
    .orb__chip-icon { width: 22px; height: 22px; }
    .skills__grid, .projects__grid, .reviews__grid { grid-template-columns: 1fr; }
    .about__card--mini-2 {
        bottom: 0;
    }

    .hero {
        padding: 160px 0 60px;
    }

    .editor {
        height: 270px;
    }

    .header__inner {
        flex-wrap: wrap;
    }

    .logo {
        width: 44%;
    }
    .lang-switcher {
        display: flex;
        width: 47%;
        justify-content: flex-end;
    }
    .about__card--mini {
        padding: 10px 15px;
        min-width: 140px;
    }

    .contacts__title {
        font-size: 68px;
    }

    .contacts__stage {
        width: min(320px, 70vw);
    }

    .about__card--mini-3 {
        right: 0;
        bottom: -10%;
    }
}

/* =====================================================================
   ========================== DARK THEME ===============================
   ===================================================================== */
:root[data-theme="dark"] {
    --bg:           #14181A;
    --bg-soft:      #1B2120;
    --bg-warm:      #232A26;
    --surface:      rgba(40, 50, 42, 0.55);
    --surface-2:    #232A26;

    --accent:       #A8C098;
    --accent-2:     #8FA886;
    --accent-soft:  #5C6F4E;
    --accent-mute:  #3D4D35;

    --text:         #E4E7D2;
    --text-2:       #B5BAA5;
    --text-muted:   #7A8073;
    --slate:        #B5BAA5;

    --line:         #2D3530;
    --shadow:       0 20px 60px -20px rgba(0, 0, 0, 0.65);
    --shadow-sm:    0 4px 20px -8px rgba(0, 0, 0, 0.55);
}

/* smooth cross-fade for the surfaces that change between themes */
.header,
.nav__list,
.nav__link,
.hero__bg,
.hero__badge,
.skill,
.skill::before,
.skill__bar,
.about__card,
.project,
.review,
.contacts,
.contacts__link,
.contacts__btn,
.contacts__orb-img,
.orb__chip,
.editor,
.hero__scroll-line {
    transition:
        all 0.3s var(--ease-out);
}

/* ===== Header / Nav ===== */
[data-theme="dark"] .header.is-scrolled {
    background: rgba(20, 24, 26, 0.85);
}
[data-theme="dark"] .nav__link {
    color: var(--text-2);
}
[data-theme="dark"] .nav.is-mobile-open .nav__list {
    background: unset;
}
[data-theme="dark"] .nav__link:hover,
[data-theme="dark"] .nav__link.is-active {
    color: var(--accent);
    background: rgba(143, 168, 134, 0.18);
}
[data-theme="dark"] .burger span {
    background: var(--text);
}
[data-theme="dark"] .btn--ghost {
    border-color: rgba(143, 168, 134, 0.25);
    color: var(--text);
}
[data-theme="dark"] .btn--ghost:hover {
    background: rgba(143, 168, 134, 0.12);
    border-color: var(--accent-soft);
}
[data-theme="dark"] .btn--primary {
    color: var(--bg);
}

/* ===== Hero ===== */
[data-theme="dark"] .hero__bg {
    background:
        radial-gradient(circle at 20% 30%, rgba(143, 168, 134, 0.18), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(74, 93, 63, 0.22), transparent 50%),
        var(--bg);
}
[data-theme="dark"] .hero__badge {
    background: rgba(40, 50, 42, 0.55);
    border-color: rgba(143, 168, 134, 0.3);
}
[data-theme="dark"] .hero__badge-dot {
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(168, 192, 152, 0.6);
}
[data-theme="dark"] .hero__title em {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===== Editor chips ===== */
[data-theme="dark"] .orb__chip {
    background: linear-gradient(135deg,
        rgba(50, 60, 50, 0.65),
        rgba(40, 50, 42, 0.32));
    color: var(--accent);
    box-shadow:
        0 18px 38px -12px rgba(0, 0, 0, 0.55),
        0 6px 14px -6px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(143, 168, 134, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* ===== Section tag / title ===== */
[data-theme="dark"] .section__tag {
    background: rgba(143, 168, 134, 0.16);
    color: var(--accent);
}
[data-theme="dark"] .section__title em {
    color: var(--accent);
}

/* ===== Skills ===== */
[data-theme="dark"] .skills {
    background:
        linear-gradient(135deg,
            rgba(20, 24, 26, 0.92),
            rgba(28, 35, 30, 0.95) 60%,
            rgba(35, 42, 38, 0.9)),
        url('img/skills-bg.jpg') center/cover no-repeat fixed;
}
[data-theme="dark"] .skills::before {
    background:
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(143, 168, 134, 0.15), transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 100%, rgba(168, 180, 200, 0.10), transparent 60%);
}
[data-theme="dark"] .skill {
    background: linear-gradient(135deg,
        rgba(50, 60, 50, 0.5),
        rgba(40, 50, 42, 0.22));
    box-shadow:
        0 8px 30px -12px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(143, 168, 134, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .skill::before {
    background: linear-gradient(180deg,
        rgba(143, 168, 134, 0.08),
        transparent);
}
[data-theme="dark"] .skill:hover {
    box-shadow:
        0 25px 50px -15px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(143, 168, 134, 0.3);
}
[data-theme="dark"] .skill__bar {
    background: rgba(143, 168, 134, 0.14);
}
[data-theme="dark"] .skill__icon--img {
    background: rgba(40, 50, 42, 0.4);
    border-color: rgba(143, 168, 134, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(143, 168, 134, 0.25),
        0 4px 12px -4px rgba(0, 0, 0, 0.45);
}

/* ===== About ===== */
[data-theme="dark"] .about__card {
    background: linear-gradient(135deg,
        rgba(50, 60, 50, 0.55),
        rgba(40, 50, 42, 0.28));
    box-shadow:
        0 20px 50px -20px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(143, 168, 134, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] .about__card--main {
    background: linear-gradient(135deg, var(--accent-soft), var(--accent-mute));
    color: var(--text);
    box-shadow: 0px 7px 25px 6px rgba(74, 93, 63, 0.4);
}
[data-theme="dark"] .about__lead strong,
[data-theme="dark"] .about__text strong {
    color: var(--accent);
}
[data-theme="dark"] .about__mini-num {
    color: var(--accent);
}
[data-theme="dark"] .about__feature-icon {
    background: var(--accent);
    color: var(--bg);
}

/* ===== Projects ===== */
[data-theme="dark"] .projects {
    background: var(--bg-soft);
}
[data-theme="dark"] .project {
    background: linear-gradient(135deg,
        rgba(50, 60, 50, 0.5),
        rgba(40, 50, 42, 0.25));
    border-color: rgba(143, 168, 134, 0.16);
}
[data-theme="dark"] .project:hover {
    border-color: var(--accent-soft);
}
[data-theme="dark"] .project__tags span {
    background: rgba(143, 168, 134, 0.16);
    color: var(--accent);
}

/* ===== Reviews ===== */
[data-theme="dark"] .review {
    background: linear-gradient(135deg,
        rgba(50, 60, 50, 0.5),
        rgba(40, 50, 42, 0.25));
}
[data-theme="dark"] .review__quote {
    color: var(--accent);
    opacity: 0.3;
}
[data-theme="dark"] .review__author {
    border-top-color: rgba(143, 168, 134, 0.18);
}

/* ===== Contacts ===== */
[data-theme="dark"] .contacts {
    background:
        radial-gradient(ellipse 70% 55% at 50% 32%, #1F2620 0%, transparent 70%),
        linear-gradient(180deg, #1B211D 0%, #14181A 100%);
    border-top-color: rgba(143, 168, 134, 0.18);
}
[data-theme="dark"] .contacts__orb-img {
    filter: drop-shadow(0px 0px 80px rgba(143, 168, 134, 0.55));
}
[data-theme="dark"] .contacts__btn {
    background: #4a5d3fa1;
    color: var(--text);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
[data-theme="dark"] .contacts__btn:hover {
    backdrop-filter: blur(3px);
    background: #4a5d3f82;
}
[data-theme="dark"] .contacts__title {
    color: var(--text-2);
    opacity: 0.55;
}
[data-theme="dark"] .contacts__link {
    background: linear-gradient(135deg,
        rgba(50, 60, 50, 0.6),
        rgba(40, 50, 42, 0.32));
    border-color: rgba(143, 168, 134, 0.22);
    color: var(--text);
    box-shadow:
        0 8px 22px -10px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(143, 168, 134, 0.18);
}
[data-theme="dark"] .contacts__link:hover {
    background: var(--accent-soft);
    color: var(--text);
    border-color: var(--accent-soft);
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] .contacts__link-icon {
    color: var(--accent);
}
[data-theme="dark"] .contacts__link:hover .contacts__link-icon {
    color: var(--text);
}

/* ===== Mobile nav background in dark theme ===== */
@media (max-width: 768px) {
    [data-theme="dark"] .nav.is-mobile-open {
        background: var(--bg);
    }
}

/* ===== Language switcher: dark theme ===== */
[data-theme="dark"] .lang-switcher__trigger {
    background: linear-gradient(135deg,
        rgba(50, 60, 50, 0.55),
        rgba(40, 50, 42, 0.3));
    border-color: var(--accent-soft);
    color: var(--text);
    box-shadow:
        0 6px 18px -10px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(143, 168, 134, 0.22);
}
[data-theme="dark"] .lang-switcher__trigger:hover {
    background: linear-gradient(135deg,
        rgba(50, 60, 50, 0.7),
        rgba(40, 50, 42, 0.45));
    box-shadow:
        0 10px 24px -10px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(143, 168, 134, 0.3);
}
[data-theme="dark"] .lang-switcher__globe img,
[data-theme="dark"] .lang-switcher__chev img {
    /* the icons are dark-green strokes — brighten them to match the dark palette */
    filter: brightness(0) saturate(100%) invert(82%) sepia(11%) saturate(528%) hue-rotate(48deg) brightness(92%) contrast(86%);
}
[data-theme="dark"] .lang-switcher__menu {
    background: linear-gradient(135deg,
        rgba(50, 60, 50, 0.7),
        rgba(40, 50, 42, 0.45));
    border-color: rgba(143, 168, 134, 0.25);
    box-shadow:
        0 20px 50px -20px rgba(0, 0, 0, 0.7),
        0 8px 24px -10px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(143, 168, 134, 0.22);
}
[data-theme="dark"] .lang-switcher__option {
    color: var(--text);
}
[data-theme="dark"] .lang-switcher__option:hover {
    background: rgba(143, 168, 134, 0.18);
}
[data-theme="dark"] .lang-switcher__option.is-active {
    background: linear-gradient(135deg,
        rgba(143, 168, 134, 0.28),
        rgba(143, 168, 134, 0.14));
    box-shadow:
        inset 0 1px 0 rgba(143, 168, 134, 0.3),
        0 4px 12px -6px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .lang-switcher__flag {
    box-shadow:
        0 2px 6px -2px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(143, 168, 134, 0.3);
}
