/* Shared layout for every theme's homepage sections (see templates/partials/homepage-render.php).
   Colors come from the active theme's CSS custom properties, so one set of rules re-skins
   automatically across every installed theme.

   This file owns STRUCTURE only -- grids, spacing, aspect ratios, responsive rules. Each theme's
   own theme.css owns the LOOK (surfaces, borders, glow, type scale). That split is what lets a
   theme restyle the homepage completely without re-solving layout, and what keeps a brand-new
   theme legible before it has styled anything at all. */

.hp-hero {
    padding: 60px 0 40px;
}
.hp-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}
@media (max-width: 860px) {
    .hp-hero-grid { grid-template-columns: 1fr; text-align: center; }
}
.hp-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.hp-headline {
    font-size: clamp(2rem, 4vw, 2.9rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 16px;
    font-family: var(--font-heading, inherit);
}
.hp-subheadline {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 540px;
    margin: 0 0 28px;
}
@media (max-width: 860px) {
    .hp-subheadline { margin-left: auto; margin-right: auto; }
}
.hp-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .hp-hero-actions { justify-content: center; } }
.hp-hero-photo {
    width: 100%; max-width: 420px; margin: 0 auto;
    border-radius: 18px; object-fit: cover; aspect-ratio: 1/1;
    box-shadow: var(--shadow-md);
}

.hp-section { padding: 56px 24px; max-width: 1180px; margin: 0 auto; }
.hp-section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.hp-section-title { font-size: 1.9rem; font-weight: 800; margin: 0 0 10px; font-family: var(--font-heading, inherit); }
.hp-section-subtitle { color: var(--color-text-muted); font-size: 1.02rem; }

.hp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}
@media (max-width: 760px) { .hp-stats { grid-template-columns: repeat(2, 1fr); } }
.hp-stat { text-align: center; padding: 20px 10px; }
.hp-stat-value { font-size: 2rem; font-weight: 800; color: var(--color-primary); font-family: var(--font-heading, inherit); }
.hp-stat-label { color: var(--color-text-muted); font-size: 0.86rem; margin-top: 4px; }

.hp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 900px) { .hp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .hp-grid { grid-template-columns: 1fr; } }
.hp-grid-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 26px 22px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.hp-grid-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.hp-grid-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
    color: var(--color-primary);
    margin-bottom: 16px;
}
.hp-grid-card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.hp-grid-card p { margin: 0; color: var(--color-text-muted); font-size: 0.92rem; }

.hp-testimonials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 900px) { .hp-testimonials { grid-template-columns: 1fr; } }
.hp-testimonial {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 26px 22px;
    position: relative;
}
.hp-testimonial-quote-icon { color: var(--color-primary); opacity: 0.35; margin-bottom: 10px; }
.hp-testimonial p.hp-quote { font-style: italic; color: var(--color-text); margin: 0 0 16px; }
.hp-testimonial-author { display: flex; align-items: center; gap: 10px; }
.hp-testimonial-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--color-border); }
.hp-testimonial-avatar-fallback {
    width: 40px; height: 40px; border-radius: 50%; background: var(--color-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem;
}
.hp-testimonial-name { font-weight: 700; font-size: 0.92rem; }
.hp-testimonial-role { color: var(--color-text-muted); font-size: 0.8rem; }

.hp-cta {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark, var(--color-primary)));
    color: #fff;
    border-radius: 20px;
    padding: 48px 32px;
    text-align: center;
    max-width: 1180px;
    margin: 20px auto 60px;
}
.hp-cta h2 { margin: 0 0 10px; font-size: 1.8rem; }
.hp-cta p { margin: 0 0 24px; opacity: 0.92; max-width: 540px; margin-left: auto; margin-right: auto; }
.hp-cta .btn { background: #fff; color: var(--color-primary); }
.hp-cta .btn:hover { opacity: 0.92; }

.hp-explore-more {
    text-align: center;
    padding: 0 24px 60px;
}
.hp-explore-more a { margin: 0 8px; }


/* =========================================================
   Data-driven sections -- projects / skills / timeline /
   posts / products. Their content is the site's own live
   public data (classes/HomepageData.php), so these blocks
   only ever appear when there is something real to show.
   ========================================================= */

/* ---------- Trailing "see everything" link ---------- */
.hp-section-more { margin-top: 26px; }
.hp-arrow-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--color-primary); }
.hp-arrow-link:hover { text-decoration: none; }

/* ---------- Selected work (portfolio projects) ---------- */
.hp-work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 980px) { .hp-work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .hp-work-grid { grid-template-columns: 1fr; } }
.hp-work-card {
    display: block;
    position: relative;
    padding: 26px 22px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: inherit;
}
.hp-work-index { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; color: var(--color-text-muted); margin-bottom: 12px; }
.hp-work-title { margin: 0 0 8px; font-size: 1.15rem; }
.hp-work-text { margin: 0 0 14px; font-size: 0.92rem; color: var(--color-text-muted); }
.hp-work-cue { position: absolute; top: 22px; right: 22px; }

.hp-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-chip {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    font-size: 0.74rem; font-weight: 600;
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
    color: var(--color-primary);
}

/* ---------- Capabilities (portfolio skills) ---------- */
.hp-skill-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.hp-skill-chip {
    display: inline-block; padding: 9px 18px; border-radius: 999px;
    font-size: 0.9rem; font-weight: 600;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

/* ---------- Timeline (portfolio experience) ---------- */
.hp-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 26px;
    border-left: 2px solid var(--color-border);
    max-width: 760px;
}
.hp-timeline-item { position: relative; padding-bottom: 30px; }
.hp-timeline-item:last-child { padding-bottom: 0; }
/* The node sits on the rail itself: half its own width back, plus the 2px rail. */
.hp-timeline-item::before {
    content: "";
    position: absolute;
    left: -32px;
    top: 4px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--color-primary);
}
.hp-timeline-period { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-muted); }
.hp-timeline-title { margin: 4px 0 2px; font-size: 1.05rem; }
.hp-timeline-org { font-size: 0.9rem; color: var(--color-text-muted); }
.hp-timeline-body { margin: 8px 0 0; font-size: 0.9rem; color: var(--color-text-muted); }

/* ---------- Journal (blog posts) ---------- */
.hp-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 900px) { .hp-post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .hp-post-grid { grid-template-columns: 1fr; } }
.hp-post-card {
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: inherit;
    overflow: hidden;
}
.hp-post-cover { display: block; overflow: hidden; }
.hp-post-cover img { display: block; width: 100%; height: 180px; object-fit: cover; }
.hp-post-body { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.hp-post-meta { display: flex; align-items: center; gap: 10px; font-size: 0.78rem; color: var(--color-text-muted); }
.hp-post-title { font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.hp-post-excerpt { font-size: 0.9rem; color: var(--color-text-muted); }

/* ---------- Store strip (store products) ---------- */
.hp-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 900px) { .hp-product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .hp-product-grid { grid-template-columns: 1fr; } }
.hp-product-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: inherit;
    overflow: hidden;
    padding-bottom: 18px;
}
.hp-product-image { display: block; overflow: hidden; }
.hp-product-image img { display: block; width: 100%; height: 200px; object-fit: cover; }
.hp-product-image-empty { height: 200px; background: var(--color-border); }
.hp-product-name { padding: 14px 18px 0; font-weight: 600; }
.hp-product-price { padding: 0 18px; font-weight: 700; color: var(--color-primary); }
