/* ================================
   FRONT PAGE STYLES
================================ */

/* ================================
   BASE LAYOUT
================================ */
.fp-section {
    padding: 64px 0;
    width: 100%;
}

.fp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 640px) {
    .fp-container {
        padding: 0 16px;
    }
}

/* ================================
   BLOCK 1: GREETING
================================ */
.fp-greeting {
    padding: 60px 0;
    background-color: #f9f9f9;
}

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

.greeting-text {
    flex: 1;
    max-width: 550px;
}

.greeting-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px;
    line-height: 1.2;
}

.greeting-subtitle {
    font-size: 1.125rem;
    color: #555;
    margin: 0 0 16px;
    line-height: 1.5;
}

.greeting-description {
    font-style: italic;
    font-size: 1rem;
    color: #444;
    margin: 0 0 24px;
}

.greeting-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background-color: #0073aa;
    color: #fff;
}

.btn-secondary {
    background-color: transparent;
    color: #0073aa;
    border: 2px solid #0073aa;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.greeting-avatar {
    flex: 0 0 200px;
}

.avatar-image {
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 4px solid #0073aa;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    object-fit: cover;
}

@media (max-width: 900px) {
    .greeting-content {
        flex-direction: column;
        text-align: center;
    }

    .greeting-text {
        max-width: 100%;
    }

    .greeting-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        text-align: center;
    }

    .greeting-title {
        font-size: 2rem;
    }

    .greeting-subtitle {
        font-size: 1rem;
    }
}

/* ================================
   BLOCK 2: SKILLS
================================ */
.fp-skills {
    padding: 64px 0;
    background: transparent;
}

.skills-heading {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    color: #111;
    margin-bottom: 48px;
}

.skills-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

.skills-grid {
    display: flex;
    gap: 24px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.skill-card {
    flex: 1;
    min-width: 260px;
    max-width: 100%;
    background-color: #0073aa;
    color: #fff;
    padding: 36px 24px;
    border-radius: 18px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.25);
}

.skill-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
}

.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.skill-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 14px;
    color: #fff;
}

.skill-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #f1f5f9;
}

@media (max-width: 900px) {
    .skills-grid {
        flex-direction: column;
        align-items: center;
    }

    .skill-card {
        max-width: 420px;
    }
}

/* ================================
   BLOCK 2.5: MANIFEST / WELCOME
================================ */
.fp-manifest {
    padding: 64px 0;
    background-color: #f0f8ff; /* светлый цвет блока */
    text-align: center;
}

.manifest-inner {
    max-width: 900px;
    margin: 0 auto;
}

.manifest-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 16px;
    line-height: 1.3;
}

.manifest-subtitle {
    font-size: 1.125rem;
    color: #555;
    margin-bottom: 24px;
}

.manifest-text p {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 12px;
}

.manifest-accent {
    font-weight: 600;
    color: #0073aa;
    margin-top: 24px;
    font-size: 1.125rem;
}

/* ================================
   BLOCK 3: PROJECTS
================================ */
.fp-projects {
    margin-top: 64px;
}

.fp-projects .fp-container > h2 {
    font-size: 1.75rem;
    color: #111;
    text-align: center;
    margin: 0 0 40px;
}

/* FLEX GRID для карточек */
.fp-projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

/* Карточка поста */
.post-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    width: calc(33.333% - 16px);
    min-width: 260px;
    max-width: 360px;
    text-align: left;
}

/* Изображение карточки */
.post-card .post-thumb {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.post-card .post-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Контент карточки */
.post-card .post-content {
    padding: 16px;
}

/* Заголовок */
.post-card .post-title {
    font-size: 1.125rem;
    line-height: 1.3;
    margin: 8px 0 10px;
    color: #111;
}

.post-card .post-title a {
    color: inherit;
    text-decoration: none;
}

.post-card .post-title a:hover {
    text-decoration: underline;
}

/* Параграфы */
.post-card .post-content p,
.post-card .post-content li,
.post-card .post-content blockquote,
.post-card .wp-block-paragraph,
.post-card .wp-block-heading,
.post-card .wp-block-list {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin: 0 0 10px;
}

/* FOOTER + Рейтинг */
.post-card .post-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #777;
}

.post-card .post-footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-card .post-rating {
    display: flex;
    gap: 4px;
}

.post-card .post-rating .star {
    font-size: 16px;
    color: #d1d5db;
}

.post-card .post-rating .star.is-filled {
    color: #f5b301;
}

.post-card .post-footer-right a.read-more-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.post-card .post-footer-right a.read-more-link:hover {
    text-decoration: underline;
}

/* MEDIA QUERIES */
@media (max-width: 1024px) {
    .post-card {
        width: calc(50% - 12px);
    }
}

@media (max-width: 640px) {
    .post-card {
        width: 100%;
        margin: 0 auto;
    }

    .post-card .post-content {
        padding: 12px;
    }

    .post-card .post-title {
        font-size: 1rem;
    }

    .post-card .post-footer {
        font-size: 12px;
        padding: 10px 12px;
    }
}

/* ================================
   SAFE GLOBAL REFINEMENTS
================================ */
.site-main h2:not(.post-title) {
    margin-bottom: 20px;
}

.post-card *,
.post-card *::before,
.post-card *::after {
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}