:root {
    --main: #f4e9d0;
    --accent: #8b0000;
    --second-accent: #d4af37;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== КОНТЕЙНЕР ===== */
.portfolio-wrap {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== КАРТОЧКА ===== */
.portfolio-item {
    flex: 0 0 calc(25% - 22.5px);
}

/* ссылка = вся карточка */
.portfolio-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ===== ОСНОВА КАРТОЧКИ ===== */
.portfolio-item-wrap {
    position: relative;
    overflow: hidden;
    background: var(--main);
    border: 2px solid var(--second-accent);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* затемнение */
.portfolio-item-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(139, 0, 0, 0.75),
        rgba(0,0,0,0.2)
    );
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

/* ===== КАРТИНКА ===== */
.portfolio-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    opacity: 0.9;
    filter: sepia(25%) contrast(0.95);
    transition: transform 0.5s ease, filter 0.5s ease;
}

/* ===== ТЕКСТ (СТАТИЧНЫЙ) ===== */
.portfolio-heading {
    position: absolute;
    bottom: 20px;
    left: 15px;
    right: 15px;
    z-index: 2;
    text-align: center;
}

.portfolio-heading h3 {
    font-size: 16px;
    font-weight: normal;
    color: var(--second-accent);
    background: rgba(139, 0, 0, 0.85);
    padding: 10px;
    border: 1px solid var(--second-accent);
}

/* ===== HOVER ЭФФЕКТЫ ===== */
.portfolio-item:hover .portfolio-item-wrap {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}

.portfolio-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.portfolio-item:hover .portfolio-item-wrap::after {
    opacity: 0.85;
}

/* ===== УДАЛЕНО ВСЁ ЛИШНЕЕ ===== */
/* inner, ul, li эффекты убраны полностью */

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
    .portfolio-item {
        flex: 0 0 48%;
    }
}

@media (max-width: 500px) {
    .portfolio-item {
        flex: 0 0 100%;
    }
}

/* ===== СЕКЦИЯ ===== */
.portfolio-section {
    background: linear-gradient(to bottom, #1a1a1a, #2b2b2b);
    padding: 100px 20px 120px;
}

.portfolio-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
    color: var(--second-accent);
}

html {
    scroll-behavior: smooth;
}