/* ============================================
   Site Theme Override — Ivory / Marble
   Loaded after styles.css on every page. Redefines shared
   tokens site-wide; the sizing rules near the bottom only
   match index.html's specific classes (headshot, certs, etc.)
   and are harmless no-ops elsewhere.
   ============================================ */

:root {
    --bg-deep: #f0e4e4;
    --bg-surface: #eeece6;
    --bg-card: #d4d0c971;
    --bg-card-hover: #f4f1e9;
    --text-primary: #1b1b19;
    --text-secondary: #5b564c;
    --text-muted: #8a8375;
    --border-subtle: rgba(36, 33, 28, 0.08);
    --border-accent: rgba(27, 100, 134, 0.28);
    --accent-glow: rgba(0, 174, 255, 0.14);

    /* buy.html and account.html reference these but they were never
       defined anywhere in styles.css — inputs/package cards were
       rendering with a transparent background. Defining them here
       since both pages now load this file. */
    --bg-tertiary: var(--bg-surface);
    --border-hover: var(--border-accent);
}

html {
    font-size: 17.5px;
}

/* Marble/chalky base: a soft directional gradient instead of flat
   color, so the page reads as stone rather than a solid fill. */
body {
    position: relative;
    background: linear-gradient(160deg, #d1d0ce 0%, #4e44255e 45%, #a5a1a125 100%);
}

/* Hardcoded nav backdrop colors in styles.css don't derive from
   --bg-deep, so they need explicit overrides here. */
.nav {
    background: rgba(107, 107, 105, 0.055);
}

@media (max-width: 640px) {
    .nav-links {
        background: rgba(245, 243, 240, 0.96);
    }
}

/* --- Subtle drama: soft top highlight + chalky grain --- */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 700px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 68%);
    opacity: 0.4;
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.035;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: -1;
}

/* --- A little larger, a little more presence --- */
.container {
    max-width: 1080px;
}

.card {
    padding: clamp(24px, 3vw, 36px);
    box-shadow: 0 8px 28px -14px rgba(36, 33, 28, 0.14), 0 1px 2px rgba(36, 33, 28, 0.04);
}

.headshot img {
    width: 156px;
    height: 234px;
    box-shadow: 0 0 0 1px var(--border-subtle), 0 12px 28px -12px rgba(36, 33, 28, 0.22);
}

.about h2 {
    font-size: 1.75rem;
    font-weight: 800;
}

.about p {
    font-size: 0.98rem;
}

.certs img {
    width: 100px;
    height: 100px;
}

/* Cert badges now link to Credly — keep the anchor layout-neutral
   so the existing .certs img hover-scale still reads. */
.certs a {
    display: inline-flex;
    line-height: 0;
    border-radius: var(--radius-sm);
}

.section-title {
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .headshot img {
        width: 136px;
        height: 204px;
    }

    .about h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   index.html v2 — hero, projects, connect
   Loaded after styles.css; these override the dark-theme
   accents (near-invisible on marble) and style the new
   homepage components. Index-specific — harmless no-ops
   on other pages.
   ============================================ */

/* Accent retuned for the marble/light theme. The base
   --accent (#0b2064) is near-black and reads as dead text
   on stone; teal + indigo actually register here. */
:root {
    --accent: #0e7490;
    --accent-secondary: #4f46e5;
    --accent-dim: rgba(14, 116, 144, 0.10);
    --accent-glow: rgba(14, 116, 144, 0.16);
    --border-accent: rgba(14, 116, 144, 0.30);
}

/* --- Hero card --- */
.hero-card {
    position: relative;
    overflow: hidden;
}

.hero-card .about {
    gap: 14px;
}

.about h1 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary);
}

.about .lead {
    font-size: clamp(1.05rem, 2.6vw, 1.4rem);
    font-weight: 700;
    line-height: 1.25;
}

/* Solid fallback if background-clip:text is unsupported */
.about .lead .gradient-text {
    color: var(--accent);
}

.about .sub {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 48ch;
}

/* Clickable cert badges now live in the hero next to the
   portrait — smaller than the standalone size, tighter gap. */
.about .certs {
    gap: 12px;
    margin: 2px 0;
}

.about .certs img {
    width: 74px;
    height: 74px;
}

.status-pill {
    align-self: flex-start;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-emerald, #10b981);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
    display: inline-block;
    animation: statusPulse 2.4s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.skill-pills,
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cta-row {
    gap: 12px;
    margin-top: 6px;
}

/* --- Selected work grid --- */
.feature-grid {
    margin-top: 4px;
}

.feature-item {
    display: block;
    text-decoration: none;
    background: var(--bg-card-hover);
    transition: border-color var(--transition-smooth),
                box-shadow var(--transition-smooth),
                transform var(--transition-smooth);
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -16px rgba(36, 33, 28, 0.28);
}

.feature-eyebrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--accent);
    margin-bottom: 10px;
}

.feature-eyebrow .arrow {
    color: var(--text-muted);
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.feature-item:hover .arrow {
    transform: translateX(4px);
    color: var(--accent);
}

.live-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-rose, #f43f5e);
}

.live-label .status-dot {
    background: var(--accent-rose, #f43f5e);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18);
}

.feature-item h3 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- Beatrix card: carries its own "Kill Bill" theme
   (black / yellow / red) + GitHub social banner, so it
   previews the page it links to. --- */
.feature-item--beatrix {
    padding: 0;
    overflow: hidden;
    position: relative;
    background: #18181b;
    border-color: rgba(232, 200, 64, 0.24);
}

.feature-item--beatrix::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2;
    background: linear-gradient(90deg, transparent, #e8c840 20%, #c0392b 50%, #e8c840 80%, transparent);
}

.feature-item--beatrix .feature-banner {
    aspect-ratio: 2 / 1;
    background: #0c0c0e;
    overflow: hidden;
}

.feature-item--beatrix .feature-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-smooth);
}

.feature-item--beatrix:hover .feature-banner img {
    transform: scale(1.04);
}

.feature-item--beatrix .feature-body {
    padding: 20px 22px 24px;
}

.feature-item--beatrix .feature-eyebrow {
    color: #e8c840;
}

.feature-item--beatrix .feature-eyebrow .arrow {
    color: rgba(232, 200, 64, 0.7);
}

.feature-item--beatrix:hover .feature-eyebrow .arrow {
    color: #e8c840;
}

.feature-item--beatrix h3 {
    color: #e8e6e3;
}

.feature-item--beatrix p {
    color: #a8a8b0;
}

.feature-item--beatrix:hover {
    transform: translateY(-3px);
    border-color: rgba(232, 200, 64, 0.5);
    box-shadow: 0 16px 34px -16px rgba(12, 12, 14, 0.55);
}

/* --- Genesis card: carries its own "autonomous mind" theme
   (deep blue/indigo glow) matching the Genesis page's brand,
   with the tree-of-knowledge logo banner previewing the page. --- */
.feature-item--genesis {
    padding: 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(160deg, #0d1430 0%, #0b0f1a 100%);
    border-color: rgba(0, 174, 255, 0.22);
}

.feature-item--genesis::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2;
    background: linear-gradient(90deg, transparent, #00aeff 30%, var(--accent-secondary) 70%, transparent);
}

.feature-item--genesis .feature-banner {
    aspect-ratio: 2 / 1;
    background: radial-gradient(ellipse at center, rgba(0, 174, 255, 0.18) 0%, transparent 70%), #0b0f1a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2%;
}

.feature-item--genesis .feature-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 20px rgba(0, 174, 255, 0.3));
    transition: transform var(--transition-smooth);
}

.feature-item--genesis:hover .feature-banner img {
    transform: scale(1.06);
}

.feature-item--genesis .feature-body {
    padding: 20px 22px 24px;
}

.feature-item--genesis .feature-eyebrow {
    color: #38bdf8;
}

.feature-item--genesis .feature-eyebrow .arrow {
    color: rgba(56, 189, 248, 0.7);
}

.feature-item--genesis:hover .feature-eyebrow .arrow {
    color: #38bdf8;
}

.feature-item--genesis h3 {
    color: #e8e6e3;
}

.feature-item--genesis p {
    color: #a8a8b0;
}

.feature-item--genesis:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 174, 255, 0.5);
    box-shadow: 0 16px 34px -16px rgba(11, 15, 26, 0.6);
}

/* --- Genesis LIVE card: same dark-mind theme as Genesis, but tinted with
   the "live" rose accent (matches .live-label) instead of blue, with the
   broadcasting-TV banner previewing the page. --- */
.feature-item--genesis-live {
    padding: 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(160deg, #1a0d16 0%, #0b0f1a 100%);
    border-color: rgba(244, 63, 94, 0.22);
}

.feature-item--genesis-live::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2;
    background: linear-gradient(90deg, transparent, #f43f5e 30%, #fb923c 70%, transparent);
}

.feature-item--genesis-live .feature-banner {
    aspect-ratio: 2 / 1;
    background: radial-gradient(ellipse at center, rgba(244, 63, 94, 0.16) 0%, transparent 70%), #0b0f1a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2%;
}

.feature-item--genesis-live .feature-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 20px rgba(244, 63, 94, 0.25));
    transition: transform var(--transition-smooth);
}

.feature-item--genesis-live:hover .feature-banner img {
    transform: scale(1.06);
}

.feature-item--genesis-live .feature-body {
    padding: 20px 22px 24px;
}

.feature-item--genesis-live .feature-eyebrow .arrow {
    color: rgba(244, 63, 94, 0.7);
}

.feature-item--genesis-live:hover .feature-eyebrow .arrow {
    color: #f43f5e;
}

.feature-item--genesis-live h3 {
    color: #e8e6e3;
}

.feature-item--genesis-live p {
    color: #a8a8b0;
}

.feature-item--genesis-live:hover {
    transform: translateY(-3px);
    border-color: rgba(244, 63, 94, 0.5);
    box-shadow: 0 16px 34px -16px rgba(11, 15, 26, 0.6);
}

/* --- Connect chips --- */
.connect-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.connect-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 22px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast),
                border-color var(--transition-fast),
                transform var(--transition-fast),
                box-shadow var(--transition-fast);
}

.connect-item:hover {
    color: var(--accent);
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -12px rgba(36, 33, 28, 0.3);
}

.connect-item .favicon {
    width: 16px;
    height: 16px;
    opacity: 0.85;
}

.connect-glyph {
    font-size: 0.95rem;
    line-height: 1;
    color: var(--accent);
}

/* --- Scroll-triggered reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-in {
        animation: none;
    }
    .status-dot {
        animation: none;
    }
}

/* --- Mobile: center the stacked hero --- */
@media (max-width: 640px) {
    .about {
        align-items: center;
        text-align: center;
    }
    .status-pill {
        align-self: center;
    }
    .skill-pills,
    .cta-row,
    .connect-row {
        justify-content: center;
    }
    .about .sub {
        max-width: none;
    }
    .cta-row .btn-glow,
    .cta-row .btn-outline {
        flex: 1 1 auto;
    }
}
