/* ===== BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-black: #0a0a0a;
    --bg-panel: #131313;
    --bg-card: #171717;
    --border-color: #262626;
    --red: #e11d2e;
    --red-dark: #7a1018;
    --text-white: #f5f5f5;
    --text-gray: #9a9a9a;
    --text-gray-dim: #6b6b6b;
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    background: var(--bg-black);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
}

.skills {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 50px clamp(20px, 5vw, 80px) 100px;
}

.red-text {
    color: var(--red);
}

/* ===== HERO ===== */
.hero-skills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
}

.hero-skills-text h1 {
    font-family: var(--font-display);
    font-size: clamp(48px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: 1px;
    color: var(--text-white);
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.1s;
}

.hero-skills-text h1 .accent {
    color: var(--red);
    text-shadow: 0 0 40px rgba(225,29,46,0.35);
}

.hero-skills-text > p {
    color: var(--text-gray);
    font-size: 15px;
    font-weight: 300;
    max-width: 400px;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.35s;
}

.hero-quote {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 2px solid var(--red);
    padding-left: 16px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.55s;
}

.hero-quote .quote-mark {
    font-family: var(--font-display);
    font-size: 34px;
    color: var(--red);
    line-height: 0.6;
}

.hero-quote p {
    font-size: 14.5px;
    color: var(--text-gray);
    font-style: italic;
    max-width: 320px;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== HERO GRAPHIC ===== */
.hero-skills-graphic {
    position: relative;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeScaleIn 1s ease forwards 0.3s;
}


@keyframes fadeScaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

.orbit-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.orbit-lines line {
    stroke: rgba(225,29,46,0.25);
    stroke-width: 1.5;
    stroke-dasharray: 6 6;
    animation: dashMove 3s linear infinite;
}

@keyframes dashMove {
    to { stroke-dashoffset: -24; }
}

.orbit-icon {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(225,29,46,0.4);
    background: rgba(20,20,20,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--red);
    z-index: 2;
    animation: floatIcon 4s ease-in-out infinite;
}

.orbit-tl { top: 4%;  left: 4%;  animation-delay: 0s; }
.orbit-bl { bottom: 4%; left: 4%; animation-delay: 1s; }
.orbit-tr { top: 2%;   right: 2%; animation-delay: 0.5s; }
.orbit-br { bottom: 2%; right: 4%; animation-delay: 1.5s; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.core-circle {
    position: relative;
    width: 340px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.core-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(225,29,46,0.5);
}

.ring-1 {
    animation: pulseRing 2.4s ease-out infinite;
}

.ring-2 {
    animation: pulseRing 2.4s ease-out infinite 1.2s;
}

@keyframes pulseRing {
    0%   { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

.core-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--red);
    box-shadow: 0 0 40px rgba(225,29,46,0.55), inset 0 0 20px rgba(225,29,46,0.3);
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .hero-skills {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-skills-text > p,
    .hero-quote p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-quote {
        justify-content: center;
        text-align: left;
    }
    .hero-skills-graphic {
        height: 240px;
    }
}


/* ===== PANEL SHELL ===== */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 24px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 1.5px;
    color: var(--text-white);
    margin-bottom: 26px;
}

.title-icon {
    color: var(--red);
    font-size: 16px;
}

/* Scroll-reveal для панелей */
.reveal-up,
.reveal-scale {
    opacity: 0;
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal-up {
    transform: translateY(50px);
}

.reveal-scale {
    transform: scale(0.92);
}

.reveal-up.is-visible,
.reveal-scale.is-visible {
    opacity: 1;
    transform: none;
}

/* ===== ЯЗЫКИ ===== */
.lang-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.lang-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 22px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease;
}

.lang-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.lang-card:nth-child(1).is-visible { transition-delay: 0s; }
.lang-card:nth-child(2).is-visible { transition-delay: 0.15s; }
.lang-card:nth-child(3).is-visible { transition-delay: 0.3s; }

.lang-card:hover {
    border-color: rgba(225,29,46,0.4);
}

.lang-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.lang-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-white);
}

.lang-badge {
    background: rgba(225,29,46,0.15);
    border: 1px solid rgba(225,29,46,0.4);
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
}

.lang-body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.lang-emoji {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(225,29,46,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.lang-emoji-flag {
    font-weight: 700;
    font-size: 13px;
    color: var(--red);
}

.lang-level {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.lang-body p {
    font-size: 12.5px;
    color: var(--text-gray-dim);
    line-height: 1.5;
}

.lang-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-track {
    flex-grow: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--red-dark), var(--red));
    box-shadow: 0 0 10px rgba(225,29,46,0.5);
    transition: width 1.2s cubic-bezier(.25,.8,.35,1) 0.3s;
}

.lang-card.is-visible .bar-fill {
    width: var(--fill-width);
}
.prog-skill-row.is-visible .bar-fill {
    width: var(--fill-width);
}

.bar-percent {
    font-size: 12px;
    color: var(--text-gray-dim);
    min-width: 34px;
    text-align: right;
}

@media (max-width: 900px) {
    .lang-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== PROGRAMMING GRID ===== */
.programming-grid {
    display: grid;
    grid-template-columns: 220px 1fr 200px;
    gap: 30px;
    align-items: start;
}

/* --- Круговой прогресс --- */
.prog-circle-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.prog-circle {
    position: relative;
    width: 170px;
    height: 170px;
    margin-bottom: 16px;
}

.prog-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.prog-circle-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 10;
}

.prog-circle-fill {
    fill: none;
    stroke: var(--red);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 427;
    stroke-dashoffset: 427;
    filter: drop-shadow(0 0 8px rgba(225,29,46,0.6));
    transition: stroke-dashoffset 1.4s cubic-bezier(.25,.8,.35,1) 0.2s;
}

.prog-circle.is-visible .prog-circle-fill {
    stroke-dashoffset: calc(427 - (427 * var(--percent)) / 100);
}

.prog-circle-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prog-circle-value {
    font-family: var(--font-display);
    font-size: 34px;
    color: var(--text-white);
}

.prog-circle-caption {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.prog-circle-block > p {
    font-size: 12.5px;
    color: var(--text-gray-dim);
    max-width: 200px;
    line-height: 1.5;
}

/* --- Строки навыков (HTML / CSS / JS) --- */
.prog-skills {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.prog-skill-row {
    display: flex;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease;
}

.prog-skill-row.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.prog-skill-row:nth-child(1).is-visible { transition-delay: 0s; }
.prog-skill-row:nth-child(2).is-visible { transition-delay: 0.15s; }
.prog-skill-row:nth-child(3).is-visible { transition-delay: 0.3s; }

.prog-skill-row:hover {
    border-color: rgba(225,29,46,0.4);
}

.tech-badge {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.tech-badge span {
    font-size: 9px;
}

.tech-html {
    background: rgba(230,81,0,0.15);
    color: #ff7043;
    border: 1px solid rgba(230,81,0,0.4);
}

.tech-css {
    background: rgba(21,101,192,0.15);
    color: #42a5f5;
    border: 1px solid rgba(21,101,192,0.4);
}

.tech-js {
    background: rgba(245,203,0,0.15);
    color: #f5cb00;
    border: 1px solid rgba(245,203,0,0.4);
}

.prog-skill-content {
    flex-grow: 1;
}

.prog-skill-top {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.prog-skill-content .bar-track {
    margin-bottom: 10px;
}

.prog-skill-content p {
    font-size: 12.5px;
    color: var(--text-gray-dim);
    line-height: 1.5;
}

/* --- Декоративная "консоль" справа --- */
.code-decor {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.code-line {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(225,29,46,0.5), rgba(225,29,46,0.1));
    opacity: 0;
    animation: codeAppear 0.5s ease forwards;
}

.reveal-scale.is-visible .code-line:nth-child(1)  { animation-delay: 0.3s; }
.reveal-scale.is-visible .code-line:nth-child(2)  { animation-delay: 0.4s; }
.reveal-scale.is-visible .code-line:nth-child(3)  { animation-delay: 0.5s; }
.reveal-scale.is-visible .code-line:nth-child(4)  { animation-delay: 0.6s; }
.reveal-scale.is-visible .code-line:nth-child(5)  { animation-delay: 0.7s; }
.reveal-scale.is-visible .code-line:nth-child(6)  { animation-delay: 0.8s; }
.reveal-scale.is-visible .code-line:nth-child(7)  { animation-delay: 0.9s; }
.reveal-scale.is-visible .code-line:nth-child(8)  { animation-delay: 1.0s; }
.reveal-scale.is-visible .code-line:nth-child(9)  { animation-delay: 1.1s; }
.reveal-scale.is-visible .code-line:nth-child(10) { animation-delay: 1.2s; }

@keyframes codeAppear {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1100px) {
    .programming-grid {
        grid-template-columns: 1fr;
    }
    .code-decor {
        display: none; /* декоративный блок скрываем на планшетах/мобильных, чтобы не занимал место */
    }
}

/* ===== ДРУГИЕ НАВЫКИ ===== */
.other-skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.other-skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.other-skill-card:hover {
    transform: translateY(-6px);
    border-color: rgba(225,29,46,0.4);
    background: rgba(225,29,46,0.06);
}

.other-skill-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(225,29,46,0.12);
    border: 1px solid rgba(225,29,46,0.3);
    border-radius: 14px;
    transition: 0.35s ease;
}

.other-skill-card:hover .other-skill-icon {
    background: var(--red);
    box-shadow: 0 0 20px rgba(225,29,46,0.5);
}

.other-skill-card h4 {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 10px;
}

.other-skill-card p {
    font-size: 12.5px;
    color: var(--text-gray-dim);
    line-height: 1.5;
}

/* Волновое появление карточек */
.reveal-card {
    opacity: 0;
    transform: translateY(36px) scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-card.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.other-skill-card:nth-child(1).is-visible { transition-delay: 0s; }
.other-skill-card:nth-child(2).is-visible { transition-delay: 0.07s; }
.other-skill-card:nth-child(3).is-visible { transition-delay: 0.14s; }
.other-skill-card:nth-child(4).is-visible { transition-delay: 0.21s; }
.other-skill-card:nth-child(5).is-visible { transition-delay: 0.28s; }
.other-skill-card:nth-child(6).is-visible { transition-delay: 0.35s; }
.other-skill-card:nth-child(7).is-visible { transition-delay: 0.42s; }
.other-skill-card:nth-child(8).is-visible { transition-delay: 0.49s; }

@media (max-width: 1000px) {
    .other-skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .other-skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ЛИЧНЫЕ КАЧЕСТВА (пилюли) ===== */
.qualities-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 13.5px;
    color: var(--text-white);
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s ease, background 0.3s ease;
    cursor: default;
}

.pill.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pill:nth-child(1).is-visible { transition-delay: 0s; }
.pill:nth-child(2).is-visible { transition-delay: 0.08s; }
.pill:nth-child(3).is-visible { transition-delay: 0.16s; }
.pill:nth-child(4).is-visible { transition-delay: 0.24s; }
.pill:nth-child(5).is-visible { transition-delay: 0.32s; }
.pill:nth-child(6).is-visible { transition-delay: 0.4s; }

.pill:hover {
    border-color: rgba(225,29,46,0.5);
    background: rgba(225,29,46,0.1);
    transform: translateY(-4px) scale(1.05);
}

/* Уважение к пользователям с отключенной анимацией */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    .reveal-up, .reveal-scale, .reveal-card, .lang-card,
    .prog-skill-row, .pill, .code-line,
    .hero-skills-text h1, .hero-skills-text > p,
    .hero-quote, .hero-skills-graphic {
        opacity: 1 !important;
        transform: none !important;
    }
    .prog-circle-fill {
        stroke-dashoffset: calc(427 - (427 * var(--percent)) / 100) !important;
    }
    .bar-fill {
        width: var(--fill-width) !important;
    }
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 4px 10px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.footer-social span {
    font-size: 12.5px;
    color: var(--text-gray-dim);
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.social-icons a:hover {
    color: var(--red);
}

@media (max-width: 600px) {
    .footer-social {
        flex-direction: column;
        text-align: center;
    }
}
