/* ================================================================
   HOME PAGE  —  page-specific layout and composition
   ================================================================ */


/* ──────────────────────────────────────────────────────────────
   HERO
   ────────────────────────────────────────────────────────────── */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-7);
    align-items: center;
    padding: var(--space-7) 0 var(--space-5);
}

.hero__copy {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.hero__headline {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.hero__headline em {
    font-style: normal;
    color: var(--accent);
}

.hero__sub {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 52ch;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.hero__platform-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

/* Hero visual: TI-84+ CE calculator screen */
.hero__visual {
    position: relative;
}

/* Outer bezel — dark plastic housing */
.hero__calc-preview {
    background: #1c1e21;
    border-radius: 14px;
    padding: 12px 12px 14px;
    box-shadow:
        0 0 0 1px #0c0d0e,
        0 12px 40px rgba(0,0,0,0.65),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Inner recessed screen surround */
.hero__calc-screen-bezel {
    background: #0e0f10;
    border-radius: 6px;
    padding: 0;
    box-shadow: inset 0 3px 10px rgba(0,0,0,0.9), inset 0 0 0 1px #080808;
    overflow: hidden;
}

/* Status bar — the dark strip at top with "NORMAL FLOAT AUTO..." */
.hero__calc-statusbar {
    background: #2a2d2f;
    padding: 4px 8px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: #c8ccc8;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #1a1c1e;
}

.hero__calc-statusbar__title {
    color: #e8eae8;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* The bright LCD panel */
.hero__calc-screen {
    background: #f0f2ee;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #1a1c18;
    line-height: 1.9;
    min-height: 190px;
    position: relative;
    overflow: hidden;
    /* Faint LCD pixel texture */
    background-image: linear-gradient(180deg, #f2f4f0 0%, #eceeed 100%);
}

.hero__calc-screen .prompt { color: #1a1c18; font-weight: 700; }
.hero__calc-screen .ok     { color: #1a1c18; font-weight: 700; }
.hero__calc-screen .addr   { color: #1a1c18; }
.hero__calc-screen .dim    { color: #6a6e68; }

/* Bottom status bar inside bezel */
.hero__calc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-3) 0;
}

.hero__calc-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: #3a3e3a;
    letter-spacing: 0.04em;
}

.hero__calc-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: #3a3e3a;
}

.hero__calc-status::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #5bba6f;
    box-shadow: 0 0 4px #5bba6f;
}

@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        padding: var(--space-5) 0 var(--space-4);
        gap: var(--space-5);
    }
}


/* ──────────────────────────────────────────────────────────────
   STATS ROW
   ────────────────────────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.stats-row__item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-5) var(--space-5);
    border-right: 1px solid var(--border);
    background: var(--bg-surface);
}

.stats-row__item:last-child { border-right: none; }

.stats-row__icon {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: var(--space-1);
}

@media (max-width: 760px) {
    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .stats-row__item:nth-child(2) { border-right: none; }
    .stats-row__item:nth-child(3) {
        border-right: 1px solid var(--border);
        border-top: 1px solid var(--border);
    }
    .stats-row__item:nth-child(4) {
        border-right: none;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 420px) {
    .stats-row { grid-template-columns: 1fr; }
    .stats-row__item { border-right: none !important; border-top: 1px solid var(--border); }
    .stats-row__item:first-child { border-top: none; }
}


/* ──────────────────────────────────────────────────────────────
   FEATURED PROJECT CARD
   ────────────────────────────────────────────────────────────── */
.featured-project {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-surface);
}

.featured-project__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-6);
    border-right: 1px solid var(--border);
}

.featured-project__title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.featured-project__desc {
    font-size: var(--text-md);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 54ch;
}

.featured-project__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.featured-project__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: auto;
    padding-top: var(--space-2);
}

.featured-project__sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.featured-project__image {
    flex: 1;
    overflow: hidden;
    background: var(--bg);
}

.featured-project__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.featured-project__github {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    border-top: 1px solid var(--border);
    background: var(--bg-raised);
}

.featured-project__github-stats {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* CI status badge */
.ci-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.55rem var(--space-4);
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: filter 0.12s, transform 0.1s;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.ci-status-badge:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.ci-status-badge:active {
    transform: translateY(0);
}

.ci-status-badge__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    background: currentColor;
    opacity: 0.85;
}

.ci-status-badge__label {
    flex: 1;
    text-align: center;
}

.ci-status-badge__count {
    font-size: var(--text-xs);
    opacity: 0.7;
    font-weight: 400;
}

.ci-status-badge--pass {
    background: #2a7a3b;
    border-color: #3aaa52;
    color: #d4f7dc;
}

.ci-status-badge--pass .ci-status-badge__dot {
    background: #6ee68a;
    box-shadow: 0 0 6px #6ee68a;
    opacity: 1;
}

.ci-status-badge--fail {
    background: #7a2a2a;
    border-color: #aa3a3a;
    color: #f7d4d4;
}

.ci-status-badge--fail .ci-status-badge__dot {
    background: #e66e6e;
    box-shadow: 0 0 6px #e66e6e;
    opacity: 1;
}

@media (max-width: 900px) {
    .featured-project {
        grid-template-columns: 1fr;
    }

    .featured-project__body {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: var(--space-5);
    }

    .featured-project__sidebar {
        flex-direction: row;
        max-height: 220px;
    }

    .featured-project__image {
        flex: 1;
    }

    .featured-project__github {
        flex: 0 0 220px;
        border-top: none;
        border-left: 1px solid var(--border);
    }
}

@media (max-width: 580px) {
    .featured-project__sidebar {
        flex-direction: column;
        max-height: unset;
    }

    .featured-project__github {
        flex: unset;
        border-left: none;
        border-top: 1px solid var(--border);
    }
}


/* ──────────────────────────────────────────────────────────────
   PROJECT MINI CARDS  (other projects row)
   ────────────────────────────────────────────────────────────── */
.project-mini-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
}

.project-mini {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-5);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}

.project-mini:hover {
    border-color: var(--border-mid);
    transform: translateY(-2px);
    color: inherit;
}

.project-mini__img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--bg-raised);
}

.project-mini__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.project-mini__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.project-mini__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border);
}

.project-mini__link {
    font-size: var(--text-xs);
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.03em;
}

@media (max-width: 760px) {
    .project-mini-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .project-mini-cards {
        grid-template-columns: 1fr;
    }
}


/* ──────────────────────────────────────────────────────────────
   CAPABILITY PILLARS
   ────────────────────────────────────────────────────────────── */
.pillars {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
}

.pillar {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-5);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent-dim);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.pillar__icon {
    color: var(--accent);
    font-size: 1.5rem;
}

.pillar__title {
    font-family: var(--font-display);
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-primary);
}

.pillar__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.65;
}

@media (max-width: 860px) {
    .pillars { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .pillars { grid-template-columns: 1fr; }
}


/* ──────────────────────────────────────────────────────────────
   CTA BAND  (bottom call-to-action)
   ────────────────────────────────────────────────────────────── */
.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    padding: var(--space-6) var(--space-6);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.cta-band__copy {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.cta-band__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.cta-band__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    max-width: 52ch;
}

.cta-band__actions {
    display: flex;
    gap: var(--space-3);
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .cta-band {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta-band__actions {
        flex-wrap: wrap;
    }
}
