/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-black: #0a0a0a;
    --bg-panel: #131313;
    --bg-card: #161616;
    --border-color: #262626;
    --red: #dc2626;
    --red-dark: #8f1c1c;
    --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;
}

.university {
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    padding: 40px clamp(20px, 5vw, 80px) 100px;
}

/* ===== HERO ===== */
.hero-university {
    position: relative;
    padding: 60px 0 40px;
    text-align: left;
    overflow: hidden;
}

.hero-university::before {
    content: "";
    position: absolute;
    top: -10%;
    right: -5%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(220,38,38,0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-subtitle {
    display: inline-block;
    color: var(--red);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-university h1 {
    font-family: var(--font-display);
    font-size: clamp(48px, 8vw, 84px);
    line-height: 0.95;
    letter-spacing: 1px;
    color: var(--text-white);
    text-shadow: 0 0 40px rgba(220,38,38,0.15);
    margin-bottom: 24px;
}

.hero-line {
    width: 60px;
    height: 3px;
    background: var(--red);
    margin: 0 0 24px;
}

.hero-university > p {
    max-width: 480px;
    color: var(--text-gray);
    font-size: 15px;
    font-weight: 300;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}


.hero-fon {
    position: absolute;
    top: 50%;
    right: -40px;
    transform: translateY(-50%);
    width: 420px;
    max-width: 45%;
    height: auto;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 30px rgba(220,38,38,0.1));
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1/1;
    border: 2px solid rgba var(--red);
}

@media (max-width: 600px) {
    .hero-fon {
        opacity: 0.2;
        width: 280px;
    }
}

@media (max-width: 400px) {
    .hero-fon {
        opacity: 0.2;
        width: 160px;
    }
}

/* ===== INFO CARDS ===== */
.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    position: relative;
    z-index: 1;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 18px;
}

.info-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220,38,38,0.1);
    border-radius: 8px;
    font-size: 18px;
}

.info-card div {
    display: flex;
    flex-direction: column;
}

.info-card strong {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-white);
}

.info-card span {
    font-size: 11.5px;
    color: var(--text-gray-dim);
    margin-top: 2px;
}

@media (max-width: 700px) {
    .info-cards {
        grid-template-columns: 1fr;
    }
}

/* ===== BLOCK (О университете) ===== */
.block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 60px;
}

.block.reverse {
    direction: rtl;
}

.block.reverse .block-text,
.block.reverse .block-image {
    direction: ltr;
}

.block-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: block;
}

.block-text h2 {
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: 1px;
    color: var(--text-white);
    text-transform: uppercase;
    margin-bottom: 16px;
    position: relative;
    padding-left: 16px;
}

.block-text h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--red);
}

.block-text p {
    color: var(--text-gray);
    font-size: 14.5px;
    font-weight: 300;
    margin-bottom: 14px;
}

.block-text p.important {
    color: var(--text-white);
    font-style: italic;
    font-size: 16px;
    border-left: 2px solid var(--red);
    padding-left: 14px;
    margin-bottom: 18px;
}

.block-text ul {
    list-style: none;
}

.block-text ul li {
    color: var(--text-gray);
    font-size: 14.5px;
    padding: 6px 0;
}

@media (max-width: 700px) {
    .block, .block.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    .block-image img {
        height: 220px;
    }
}

/* ===== PANEL SHELL (общая обёртка для панелей) ===== */
.progress-panel,
.path-panel,
.subjects-panel,
.gallery,
.goal-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    margin-top: 20px;
}

.panel-title {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-gray);
    margin-bottom: 24px;
}

/* ===== PROGRESS STATS ===== */
.progress-stats {
    display: grid;
    grid-template-columns: auto repeat(4, 1fr);
    align-items: center;
    gap: 32px;
}

.progress-circle {
    position: relative;
    width: 100px;
    height: 100px;
}

.progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.circle-fill {
    fill: none;
    stroke: var(--red);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: calc(326.7 - (326.7 * var(--percent)) / 100);
    filter: drop-shadow(0 0 6px rgba(220,38,38,0.6));
    transition: stroke-dashoffset 1s ease;
}

.circle-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-value {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--text-white);
}

.circle-caption {
    display: block;
    text-align: center;
    font-size: 11px;
    color: var(--text-gray-dim);
    margin-top: 8px;
    grid-column: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.stat-icon {
    font-size: 20px;
    color: var(--red);
    margin-bottom: 4px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 30px;
    color: var(--text-white);
    letter-spacing: 1px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-gray-dim);
    line-height: 1.4;
}

@media (max-width: 700px) {
    .progress-stats {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 28px;
    }
    .progress-circle {
        grid-column: 1 / -1;
        justify-self: center;
    }
    .circle-caption {
        grid-column: 1 / -1;
    }
}

/* ===== COURSE PATH ===== */
.course-path {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.course-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.course-card:hover {
    transform: translateY(-3px);
}

.course-img {
    width: 100%;
    height: 70px;
    border-radius: 8px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #1a1a1a, #0e0e0e);
    background-size: cover;
    background-position: center;
}

.course-card h4 {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--text-white);
    margin-bottom: 10px;
}

.course-card ul {
    list-style: none;
    flex-grow: 1;
}

.course-card ul li {
    font-size: 12px;
    color: var(--text-gray);
    padding: 3px 0;
}

.course-card ul li::before {
    content: "✔ ";
    color: var(--red);
    font-size: 10px;
}

.course-card p {
    font-size: 12px;
    color: var(--text-gray-dim);
    flex-grow: 1;
    line-height: 1.5;
}

.course-status {
    display: inline-block;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 600;
}

.status-done {
    color: var(--red);
}

.status-active {
    color: var(--red);
}

/* Завершённый курс */
.course-card.done {
    border-color: rgba(220,38,38,0.25);
    opacity: 0.85;
}

.course-check {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Текущий курс — выделен */
.course-card.active {
    border: 1px solid var(--red);
    box-shadow: 0 0 0 1px rgba(220,38,38,0.3), 0 0 24px rgba(220,38,38,0.15);
    background: linear-gradient(180deg, rgba(220,38,38,0.06), var(--bg-card));
}

/* Заблокированные курсы */
.course-card.locked {
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-gray-dim);
    opacity: 0.55;
}

.course-lock {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-gray-dim);
}

.course-card.locked h4 {
    color: var(--text-gray);
    margin-bottom: 6px;
}

@media (max-width: 900px) {
    .course-path {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 560px) {
    .course-path {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== SPLIT PANEL (Предметы + Галерея) ===== */
.split-panel {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 24px;
    margin-top: 32px;
}

.split-panel .subjects-panel,
.split-panel .gallery {
    margin-top: 0;
}

@media (max-width: 800px) {
    .split-panel {
        grid-template-columns: 1fr;
    }
}

/* ===== SKILL BARS ===== */
.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-row {
    display: grid;
    grid-template-columns: 110px 1fr 40px;
    align-items: center;
    gap: 12px;
}

.skill-name {
    font-size: 13px;
    color: var(--text-gray);
}

.skill-track {
    height: 6px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red-dark), var(--red));
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(220,38,38,0.5);
}

.skill-percent {
    font-size: 12px;
    color: var(--text-gray-dim);
    text-align: right;
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.gallery-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    filter: grayscale(20%);
    transition: filter 0.25s ease, transform 0.25s ease;
}

.gallery-grid img:hover {
    filter: grayscale(0%);
    transform: scale(1.03);
}

@media (max-width: 500px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== GOAL PANEL (Моя цель) ===== */
.goal-panel {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 28px;
    align-items: center;
}

.goal-icon {
    width: 56px;
    height: 56px;
    border: 1px solid var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--red);
}

.goal-label {
    display: block;
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.goal-text p {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 300;
    line-height: 1.7;
}

.goal-text p span,
.goal-text a {
    color: var(--red);
}

.goal-quote {
    position: relative;
    border-left: 2px solid var(--red);
    padding-left: 20px;
}

.quote-mark {
    font-family: var(--font-display);
    font-size: 40px;
    color: var(--red);
    line-height: 0.5;
    display: block;
    margin-bottom: 8px;
}

.goal-quote p {
    font-size: 15px;
    color: var(--text-white);
    font-style: italic;
    line-height: 1.5;
}

.quote-author {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-gray-dim);
}

@media (max-width: 800px) {
    .goal-panel {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .goal-icon {
        margin-bottom: 6px;
    }
}

/* ===== PAGE NAVIGATION ===== */
.page-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 48px;
}

.nav-button {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 20px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-button:hover {
    border-color: var(--red);
    color: var(--text-white);
}

.progress {
    display: flex;
    align-items: center;
    gap: 0;
}

.step {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--border-color);
    flex-shrink: 0;
}

.step.done {
    background: var(--red);
}

.step.active {
    width: 34px;
    height: 34px;
    background: var(--red);
    color: #fff;
    font-family: var(--font-display);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px rgba(220,38,38,0.2);
}

.line {
    width: 40px;
    height: 2px;
    background: var(--border-color);
}

.line.done {
    background: var(--red);
}

@media (max-width: 600px) {
    .page-navigation {
        flex-direction: column;
        gap: 20px;
    }
    .line {
        width: 20px;
    }
}


/* ===== HERO — появление при загрузке страницы ===== */
.hero-subtitle,
.hero-university h1,
.hero-line,
.hero-university > p,
.info-cards {
    opacity: 0;
}

.hero-subtitle {
    animation: fadeUp 0.7s ease forwards 0.1s;
}

.hero-university h1 {
    animation: fadeUp 0.9s ease forwards 0.25s;
}

.hero-line {
    animation: growLine 0.6s ease forwards 0.6s;
}

.hero-university > p {
    animation: fadeUp 0.8s ease forwards 0.75s;
}

.info-cards {
    animation: fadeUp 0.8s ease forwards 0.95s;
}

.hero-fon {
    opacity: 0;
    animation: fadeScale 1.2s ease forwards 0.4s;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes growLine {
    from { opacity: 0; width: 0; }
    to   { opacity: 1; width: 60px; }
}

@keyframes fadeScale {
    from { opacity: 0; transform: translateY(-50%) scale(0.9); }
    to   { opacity: 0.5; transform: translateY(-50%) scale(1); }
}

/* ===== SCROLL REVEAL — базовые состояния (до появления) ===== */
.reveal-left,
.reveal-right,
.reveal-up,
.reveal-scale,
.reveal-blur {
    opacity: 0;
    transition: opacity 0.9s ease, transform 0.9s ease, filter 0.9s ease;
}

.reveal-left {
    transform: translateX(-60px);
}

.reveal-right {
    transform: translateX(60px);
}

.reveal-up {
    transform: translateY(50px);
}

.reveal-scale {
    transform: scale(0.9);
}

.reveal-blur {
    transform: translateY(30px);
    filter: blur(8px);
}

/* Состояние "показано" — добавляется через JS при пересечении viewport */
.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-up.is-visible,
.reveal-scale.is-visible,
.reveal-blur.is-visible {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

/* ===== КАРТОЧКИ КУРСОВ — появление волной по очереди ===== */
.reveal-card {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-card.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.course-card:nth-child(1).reveal-card.is-visible { transition-delay: 0s; }
.course-card:nth-child(2).reveal-card.is-visible { transition-delay: 0.08s; }
.course-card:nth-child(3).reveal-card.is-visible { transition-delay: 0.16s; }
.course-card:nth-child(4).reveal-card.is-visible { transition-delay: 0.24s; }
.course-card:nth-child(5).reveal-card.is-visible { transition-delay: 0.32s; }
.course-card:nth-child(6).reveal-card.is-visible { transition-delay: 0.4s; }

/* ===== ШКАЛЫ ПРЕДМЕТОВ — полоски "растут" при появлении ===== */
.skill-row {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.skill-row.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.skill-row:nth-child(1).is-visible { transition-delay: 0s; }
.skill-row:nth-child(2).is-visible { transition-delay: 0.1s; }
.skill-row:nth-child(3).is-visible { transition-delay: 0.2s; }
.skill-row:nth-child(4).is-visible { transition-delay: 0.3s; }
.skill-row:nth-child(5).is-visible { transition-delay: 0.4s; }

.skill-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--red-dark), var(--red));
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(220,38,38,0.5);
    transition: width 1.1s cubic-bezier(.25,.8,.35,1) 0.3s;
}

.skill-row.is-visible .skill-fill {
    
         width: var(--fill-width);

   
}

/* ===== ГАЛЕРЕЯ — фото появляются по очереди с лёгким увеличением ===== */
.gallery-grid img {
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-grid img.is-visible {
    opacity: 1;
    transform: scale(1);
}

.gallery-grid img:nth-child(1).is-visible { transition-delay: 0s; }
.gallery-grid img:nth-child(2).is-visible { transition-delay: 0.1s; }
.gallery-grid img:nth-child(3).is-visible { transition-delay: 0.2s; }
.gallery-grid img:nth-child(4).is-visible { transition-delay: 0.3s; }
.gallery-grid img:nth-child(5).is-visible { transition-delay: 0.4s; }
.gallery-grid img:nth-child(6).is-visible { transition-delay: 0.5s; }

/* Уважение к пользователям с отключенной анимацией */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    .reveal-left, .reveal-right, .reveal-up, .reveal-scale, .reveal-blur,
    .reveal-card, .skill-row, .gallery-grid img {
        opacity: 1 !important;
        transform: none !important;
        filter: none !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;
    }
}
