/* ─── HOMEPAGE STYLES ───
   Extracted from index.html's inline <style>. LOAD ORDER MATTERS:
   this file must come AFTER theme.css — many selectors here deliberately
   override theme.css (the "cascade trap" documented in the README). */

:root {
    /* paper tones */
    --paper: #F4EDE0;
    --paper-deep: #ECE2D0;
    --paper-soft: #F8F2E7;
    --ink: #15140F;
    --ink-soft: #3A3830;
    --ink-mute: #948F7E;   /* 4.77:1 on dark */
    --ink-faint: #B5AE9C;
    /* accent - vermillion */
    --vermillion: #E46448;   /* 4.57:1 on dark */
    --vermillion-deep: #C9502F;
    --vermillion-fill: #C63D26;   /* white on it = 5.13:1 */
    /* type */
    --serif: "Fraunces", "Instrument Serif", Georgia, serif;
    --serif-display: "Instrument Serif", "Fraunces", Georgia, serif;
    --sans: "Inter", -apple-system, system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
}

/* Was unstyled, so it inherited the light body colour onto a light
   section and rendered invisible. */
.link-with-icon {
    color: var(--vermillion);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Light sections re-tune the contrast-critical tokens.
   Mirrors theme.css — this inline block loads after it and would
   otherwise win the cascade. */
.paper-section,
.blog,
.podcast-section,
.contact {
    --ink-mute: #66624F;     /* 5.27:1 on paper */
    --vermillion: #AE3520;   /* 5.4:1 on paper */
    --vermillion-deep: #A5321E;
    --vermillion-fill: #AE3520;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: #28241D;
    color: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
}

/* Navigation - Sapien Style */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(40, 36, 29, 0.95);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(244, 237, 224, 0.08);
    padding: 0 24px;
    transition: top 0.3s ease;
}

/* nav-hidden uses `top` (not transform) because iOS Safari
   refuses to animate transform on elements with backdrop-filter */
.navbar.nav-hidden {
    top: -80px;
}

/* When navbar is hidden, force-close any open mobile menu too —
   .nav-menu is position:fixed at top:64px so it doesn't follow
   the navbar's top animation */
.navbar.nav-hidden .nav-menu {
    display: none !important;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-logo .logo-text {
    font-family: var(--serif-display);
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 400;
    color: #F4EDE0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-menu a,
.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-faint);
    text-decoration: none;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-menu a:hover,
.nav-link:hover {
    color: var(--paper);
}

.nav-cta {
    background: var(--vermillion-fill, var(--vermillion)) !important;
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    /* right-aligned so the 200px panel cannot push past the viewport */
    right: 0;
    left: auto;
    background: var(--paper);
    border: 1px solid var(--ink-faint);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu,
.dropdown-toggle:hover+.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: var(--vermillion);
    color: #fff;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span,
.hamburger .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--paper);
    border-radius: 2px;
}

/* Hero - Sapien Style */
.hero {
    padding: 80px 24px 64px;
    background: #28241D;
}

.hero-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Left-aligned: the hero is a two-column grid, so centring the text
   inside the left column left it visually ragged against the edge. */
.hero-content {
    text-align: left;
}

.hero-subtitle {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--vermillion);
    font-weight: 600;
    display: block;
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--serif-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.05;
    color: var(--paper);
    margin-bottom: 20px;
}

.hero-main {
    font-family: var(--serif-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-style: italic;
    font-weight: 400;
    color: var(--paper);
}

.hero-tagline {
    font-family: var(--serif-display);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-style: italic;
    color: var(--ink-faint);
    display: block;
    margin-top: 10px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--ink-faint);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--vermillion-fill, var(--vermillion));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(217, 72, 47, 0.35);
}

.btn-secondary {
    background: rgba(244, 237, 224, 0.08);
    color: var(--paper);
    border: 1px solid rgba(244, 237, 224, 0.12);
}

.btn-secondary:hover {
    background: rgba(244, 237, 224, 0.15);
}

/* Hero Visual / Floating Elements */
.hero-visual {
    margin-top: 40px;
}

.floating-elements {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.floating-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(244, 237, 224, 0.08);
    border: 1px solid rgba(244, 237, 224, 0.12);
    color: var(--ink-faint);
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.floating-card i {
    color: var(--vermillion);
}

/* Claude for Startups membership card — subtle accent */
.floating-card-claude {
    border-color: rgba(217, 119, 87, 0.45);
    background: rgba(217, 119, 87, 0.10);
    color: var(--paper);
}
.floating-card-claude i {
    color: #D97757; /* Anthropic clay */
}

/* 5.0 App Store Rating card — gold accent */
.floating-card-rating {
    border-color: rgba(212, 175, 55, 0.45);
    background: rgba(212, 175, 55, 0.10);
    color: var(--paper);
}
.floating-card-rating i {
    color: #D4AF37; /* gold */
}

/* ── Hero icon wall + stat band ── */
.hero-iconwall {
    display: grid;
    grid-template-columns: repeat(5, 56px);
    gap: 14px;
    justify-content: center;
    margin-bottom: 26px;
}
.hero-iconwall a {
    display: block; width: 56px; height: 56px;
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hero-iconwall a:hover {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}
.hero-iconwall img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iconwall-emoji {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #1A1720, #2A2035);
}
.iconwall-web { position: relative; }
.iconwall-web::after {
    content: "WEB";
    position: absolute; bottom: 3px; right: 3px;
    font-size: 7px; font-weight: 800; letter-spacing: 0.05em;
    background: rgba(10, 8, 6, 0.6); color: #C4B5FD;
    padding: 1px 4px; border-radius: 4px;
}
.hero-visual-stack { display: flex; flex-direction: column; align-items: center; }
.hero-stats {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 8px 20px;
    font-size: 0.85rem; color: var(--ink-faint);
}
.hero-stats .stat { white-space: nowrap; }
.hero-stats .stat i { color: var(--vermillion); margin-right: 6px; font-size: 0.8rem; }
.hero-stats .stat strong { color: var(--paper); font-weight: 600; }
@media (max-width: 640px) {
    .hero { padding-top: 36px; padding-bottom: 48px; }
    .hero-container { gap: 28px; }
    .hero-iconwall { grid-template-columns: repeat(5, 46px); gap: 10px; margin-top: 8px; }
    .hero-iconwall a { width: 46px; height: 46px; border-radius: 12px; }
    .iconwall-emoji { font-size: 1.3rem; }
}

/* ── Portfolio group titles + web apps ── */
.portfolio-group-title {
    font-family: var(--mono);
    font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--vermillion); font-weight: 600;
    text-align: center;
    margin: 0 0 24px;
}
.portfolio-group-title--web { margin-top: 56px; }
.webapps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 720px;
    margin: 0 auto;
}
.app-badge.web { background: rgba(147, 112, 219, 0.16); color: #C4B5FD; }
.webapp-card h3 i {
    font-size: 0.6em; color: var(--ink-mute);
    vertical-align: 2px; margin-left: 5px;
}
@media (max-width: 640px) {
    .webapps-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: none; }
    .portfolio-group-title--web { margin-top: 40px; }
}

/* Respect reduced-motion for the reviews marquee */
@media (prefers-reduced-motion: reduce) {
    .home-reviews-grid { animation: none !important; }
    .home-reviews-track { overflow-x: auto; }
}

/* Sections - Sapien Style */
.section-eyebrow {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--vermillion);
    font-weight: 600;
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--serif-display);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-style: italic;
    font-weight: 400;
    color: var(--paper);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--ink-faint);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Paper Sections (alternate backgrounds) */
.paper-section,
.blog {
    background: var(--paper);
    padding: 80px 24px;
}

.paper-section .section-title,
.blog .section-title {
    color: var(--ink);
}

.paper-section .section-subtitle,
.blog .section-subtitle {
    color: var(--ink-soft);
}

.paper-section h3,
.paper-section h4,
.blog h3,
.blog h4 {
    color: var(--ink);
}

.paper-section p,
.blog p {
    color: var(--ink-soft);
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Cards - Sapien Style */
.service-card,
.blog-card,
.skill-card,
.mentor-item,
.cert-item {
    background: rgba(244, 237, 224, 0.06);
    border: 1px solid rgba(244, 237, 224, 0.1);
    border-radius: 16px;
    padding: 28px;
    transition: transform 0.2s, border-color 0.2s;
}

.paper-section .service-card,
.paper-section .blog-card,
.paper-section .skill-card,
.paper-section .cert-item,
.paper-section .mentor-item {
    background: var(--paper-soft);
    border-color: var(--ink-faint);
    color: var(--ink-soft);
}

.service-card:hover,
.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--vermillion);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

/* About Me Section */
.about-me-section {
    padding: 80px 24px;
}

.about-me-content {
    display: grid;
    grid-template-columns: 0.8fr 1.5fr;
    gap: 48px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

.about-me-image-wrapper {
    max-width: 280px;
    margin: 0 auto;
}

.about-me-image img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    border-radius: 12px;
}

.about-me-quote {
    text-align: center;
    margin-top: 16px;
}

.paper-section .about-me-quote .philosophy-text {
    font-family: var(--serif-display);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--ink);
}

.paper-section .about-me-quote .philosophy-text span {
    color: var(--ink-mute);
    font-size: 0.9rem;
}

.paper-section .about-me-quote .philosophy-source {
    font-size: 0.8rem;
    color: var(--ink-mute);
    margin-top: 4px;
}

.floating-decorator {
    display: none;
}

.about-me-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tab-btn {
    background: rgba(244, 237, 224, 0.08);
    border: 1px solid rgba(244, 237, 224, 0.12);
    color: var(--ink-faint);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--vermillion);
    color: #fff;
    border-color: var(--vermillion);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Timeline */
.timeline {
    position: relative;
}

.timeline-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(244, 237, 224, 0.08);
}

.timeline-marker {
    width: 12px;
    height: 12px;
    background: var(--vermillion);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.timeline-content h4 {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 500;
    color: var(--paper);
    margin-bottom: 4px;
}

.paper-section .timeline-content h4 {
    color: var(--ink);
}

.paper-section .timeline-content .company,
.paper-section .timeline-content .period {
    color: var(--ink-mute);
}

.paper-section .tab-content p {
    color: var(--ink-soft);
}

.paper-section .tab-content strong {
    color: var(--ink);
}

.timeline-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--ink-mute);
}

/* Services Grid */
.services {
    padding: 80px 24px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.service-card h3 {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--paper);
    margin: 16px 0 8px;
}

/* services section is now DARK: undo theme.css's light-leaning card text */
.services .service-card p { color: var(--ink-faint); }
.services .service-project-link { color: var(--ink-faint); border-top-color: rgba(244, 237, 224, 0.12); }
.services .service-project-link span { color: var(--ink-faint); }
.services .service-project-link a { color: #F08268; } /* 5.0:1 on the tinted card */

.paper-section .service-card h3 {
    color: var(--ink);
}

.paper-section .service-features li {
    color: var(--ink-soft);
}

.service-icon {
    width: 44px;
    height: 44px;
    background: rgba(217, 72, 47, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--vermillion);
}

.service-features {
    list-style: none;
    margin: 12px 0;
}

.service-features li {
    font-size: 0.85rem;
    color: var(--ink-faint);
    margin-bottom: 4px;
    padding-left: 16px;
    position: relative;
}

.service-features li::before {
    content: "•";
    color: var(--vermillion);
    position: absolute;
    left: 0;
}

/* Service Project Link */
.service-project-link {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(244, 237, 224, 0.1);
    font-size: 0.85rem;
    color: var(--ink-faint);
}

.service-project-link span {
    color: var(--ink-mute);
    margin-right: 8px;
}

.paper-section .service-project-link {
    border-top-color: var(--ink-faint);
    color: var(--ink-soft);
}

.paper-section .service-project-link span {
    color: var(--ink-mute);
}

.service-project-link a {
    color: var(--vermillion);
    text-decoration: none;
    font-size: 0.9rem;
}

/* Portfolio Apps Section */
.portfolio-apps-section {
    padding: 80px 24px;
    background: var(--paper);
}

.portfolio-apps-section .section-title {
    color: var(--ink);
}

.portfolio-apps-section .section-subtitle {
    color: var(--ink-soft);
}

/* light-surface card treatment */
.paper-section .portfolio-app-card {
    background: var(--paper-soft);
    border-color: rgba(21, 20, 15, 0.10);
}
.paper-section .portfolio-app-card:hover {
    border-color: var(--vermillion);
    background: #FFFDF6;
}
.paper-section .portfolio-app-card h3 { color: var(--ink); }
.paper-section .portfolio-app-card .app-tagline { color: var(--ink-mute); }
.paper-section .portfolio-app-card .app-icon { box-shadow: 0 4px 14px rgba(21, 20, 15, 0.18); }
.paper-section .app-badge.live { background: rgba(43, 122, 61, 0.12); color: #236632; }
.paper-section .app-badge.web { background: rgba(109, 40, 217, 0.10); color: #6D28D9; }
.paper-section .webapp-card h3 i { color: var(--ink-mute); }

.portfolio-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.portfolio-app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    background: rgba(244, 237, 224, 0.03);
    border: 1px solid rgba(244, 237, 224, 0.1);
    border-radius: 16px;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.portfolio-app-card:hover {
    transform: translateY(-4px);
    border-color: var(--vermillion);
    background: rgba(244, 237, 224, 0.06);
}

.portfolio-app-card .app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.portfolio-app-card .app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-app-card h3 {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--paper);
    margin: 0 0 4px 0;
}

.portfolio-app-card .app-tagline {
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.app-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-badge.live {
    background: rgba(81, 207, 102, 0.15);
    color: #51CF66;
}

.app-badge.coming {
    background: rgba(255, 193, 7, 0.15);
    color: #FFC107;
}

.app-badge.review {
    background: rgba(255, 149, 0, 0.15);
    color: #FF9500;
    animation: pulse-review 2s ease-in-out infinite;
}
@keyframes pulse-review {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}

/* Coming-soon / under-review card — dimmed, not clickable */
.portfolio-app-card.not-live {
    opacity: 0.65;
    cursor: default;
    pointer-events: none;
    filter: grayscale(20%);
    transition: opacity 0.3s, filter 0.3s;
}
.portfolio-app-card.not-live:hover {
    opacity: 0.65;
    transform: none;
    box-shadow: none;
}

/* Portfolio Apps Reviews Component */
.home-reviews-section {
    padding: 70px 24px 80px;
    background: #231F18;
    border-top: 1px solid rgba(244, 237, 224, 0.07);
    border-bottom: 1px solid rgba(244, 237, 224, 0.07);
}
.home-reviews-section .section-header {
    margin-bottom: 36px;
}
.home-reviews-section .section-title {
    color: var(--paper);
}
.home-reviews-section .section-subtitle {
    color: var(--ink-faint);
}
.home-reviews-track {
    overflow: hidden;
    padding: 12px 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.home-reviews-grid {
    display: flex;
    gap: 22px;
    width: max-content;
    animation: home-reviews-scroll var(--reviews-duration, 65s) linear infinite;
}
.home-reviews-track:hover .home-reviews-grid {
    animation-play-state: paused;
}
@keyframes home-reviews-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.home-review-card {
    width: 320px;
    flex-shrink: 0;
    background: rgba(244, 237, 224, 0.04);
    border: 1px solid rgba(244, 237, 224, 0.1);
    border-radius: 20px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-sizing: border-box;
}
.home-review-card:hover {
    transform: translateY(-4px);
    border-color: rgba(200, 150, 58, 0.55);
    background: rgba(244, 237, 224, 0.07);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.home-review-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.home-review-app-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(244, 237, 224, 0.08);
    border: 1px solid rgba(244, 237, 224, 0.14);
    border-radius: 999px;
    padding: 4px 10px 4px 5px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.home-review-app-pill:hover {
    background: rgba(244, 237, 224, 0.16);
    border-color: rgba(200, 150, 58, 0.6);
    transform: scale(1.02);
}
.home-review-app-icon {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    object-fit: cover;
}
.home-review-app-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--paper, #f4ede0);
    letter-spacing: 0.02em;
}
.home-review-app-arrow {
    font-size: 0.65rem;
    color: var(--ink-faint, rgba(244, 237, 224, 0.5));
}
.home-review-stars {
    color: #E5A93C;
    font-size: 0.85rem;
    letter-spacing: 1px;
    white-space: nowrap;
}
.home-review-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--paper, #f4ede0);
    margin: 0;
    line-height: 1.35;
}
.home-review-meta {
    font-size: 0.78rem;
    color: var(--ink-mute, #a89f91);
    margin: 0;
}
.home-review-body {
    font-size: 0.88rem;
    color: rgba(244, 237, 224, 0.82);
    line-height: 1.6;
    flex: 1;
    margin: 0;
}

/* Blog Grid */
/* Podcast Section */
.podcast-section {
    padding: 80px 24px;
    background: var(--paper);
}
.podcast-section .section-title { color: var(--ink); }
.podcast-section .section-subtitle { color: var(--ink-soft); }
.podcast-section .podcast-show-meta h3 { color: var(--ink); }
.podcast-section .podcast-desc { color: var(--ink-soft); }
.podcast-section .podcast-hosts { color: var(--ink-mute); }
.podcast-section .podcast-hosts i { color: #0A6B30; }
.podcast-section .podcast-episode {
    background: var(--paper-soft);
    border-color: rgba(21, 20, 15, 0.10);
}
.podcast-section .podcast-episode:hover {
    border-color: #0A6B30;
    background: #FFFDF6;
}
.podcast-section .podcast-episode-title { color: var(--ink-soft); }
.podcast-section .podcast-episode:hover .podcast-episode-title { color: var(--ink); }
.podcast-section .podcast-episode-num { color: #0A6B30; }
.podcast-section .podcast-episode-play { color: var(--ink-mute); }
.podcast-section .podcast-episode:hover .podcast-episode-play { color: #0A6B30; }

.podcast-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

.podcast-info {}

.podcast-show-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.podcast-show-icon {
    width: 72px;
    height: 72px;
    background: #1DB954;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 2rem;
}

.podcast-show-meta h3 {
    font-family: var(--serif-display);
    font-size: 1.4rem;
    font-style: italic;
    font-weight: 400;
    color: var(--paper);
    margin-bottom: 4px;
}

.podcast-show-meta p {
    font-size: 0.82rem;
    color: var(--ink-mute);
}

.podcast-desc {
    font-size: 0.95rem;
    color: var(--ink-faint);
    line-height: 1.65;
    margin-bottom: 28px;
}

.podcast-hosts {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--ink-mute);
    margin-bottom: 28px;
}

.podcast-hosts i {
    color: #1DB954;
}

.podcast-episodes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.podcast-episode {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(244, 237, 224, 0.04);
    border: 1px solid rgba(244, 237, 224, 0.08);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.podcast-episode:hover {
    border-color: #1DB954;
    background: rgba(29, 185, 84, 0.06);
}

.podcast-episode-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: #1DB954;
    min-width: 22px;
}

.podcast-episode-title {
    font-size: 0.875rem;
    color: var(--ink-faint);
    line-height: 1.35;
}

.podcast-episode:hover .podcast-episode-title {
    color: var(--paper);
}

.podcast-episode-play {
    margin-left: auto;
    color: var(--ink-mute);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.podcast-episode:hover .podcast-episode-play {
    color: #1DB954;
}

.podcast-badges {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.podcast-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.podcast-badge:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.podcast-badge img {
    height: 40px;
    width: auto;
    display: block;
    border-radius: 6px;
}

.podcast-badge-apple {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.podcast-badge-apple i {
    font-size: 1.35rem;
    color: #fff;
    line-height: 1;
}

.podcast-badge-apple-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.podcast-badge-apple-text span:first-child {
    font-size: 0.6rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.podcast-badge-apple-text span:last-child {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
}

.podcast-embed {
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 80px;
}

@media (max-width: 900px) {
    .podcast-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .podcast-embed {
        position: static;
    }
}

/* Blog section styling merged with paper-section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto 32px;
}

.blog-card {
    text-align: left;
}

.blog-card h3 {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--ink);
    margin: 12px 0 8px;
}

.blog-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--ink-mute);
}

.blog-category {
    background: rgba(217, 72, 47, 0.1);
    color: var(--vermillion);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.blog-excerpt {
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

.blog-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--vermillion);
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 12px;
    font-weight: 500;
}

/* FAQ Section */
.faq-section {
    padding: 80px 24px;
    background: #28241D;
}
.faq-list {
    max-width: 780px;
    margin: 0 auto;
}
.faq-item {
    border-bottom: 1px solid rgba(244, 237, 224, 0.14);
}
.faq-item summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 4px;
    cursor: pointer;
    list-style: none;
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--paper);
    transition: color 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--vermillion); }
.faq-item summary::after {
    content: "\f067"; /* plus */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    color: var(--vermillion);
    flex-shrink: 0;
    margin-top: 4px;
    transition: transform 0.2s;
}
.faq-item[open] summary::after {
    content: "\f068"; /* minus */
}
.faq-item[open] summary { color: var(--vermillion); }
.faq-answer {
    padding: 0 4px 22px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ink-faint);
    max-width: 68ch;
}
.faq-answer a { color: var(--vermillion); }
.faq-answer p + p { margin-top: 12px; }

/* Contact Section */
.contact {
    padding: 80px 24px;
    background: var(--paper);
}

.contact .section-title {
    color: var(--ink);
}

.contact .section-subtitle {
    color: var(--ink-soft);
}

.contact-quote {
    max-width: 600px;
    margin: 24px auto;
    padding: 24px;
    background: var(--paper-soft);
    border-left: 3px solid var(--vermillion);
    border-radius: 0 12px 12px 0;
}

.contact-quote blockquote {
    font-family: var(--serif-display);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--ink);
    margin-bottom: 8px;
}

.contact-quote cite {
    font-size: 0.85rem;
    color: var(--ink-mute);
    font-style: normal;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    max-width: 900px;
    margin: 48px auto 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-item i {
    width: 44px;
    height: 44px;
    background: rgba(217, 72, 47, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vermillion);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 6px;
    display: block;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--paper-soft);
    border: 1px solid var(--ink-faint);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--ink);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--vermillion);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--ink-faint);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237C7868' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-group select option {
    background: var(--paper);
    color: var(--ink);
}

/* Certificates & Mentoring */
.certificates-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cert-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--vermillion);
    margin-bottom: 10px;
    margin-top: 4px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.cert-item {
    font-size: 0.88rem;
    padding: 12px 16px;
}

/* Mentoring */
.mentor-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mentor-item {
    font-size: 0.88rem;
    padding: 12px 16px;
}

/* Tab buttons in paper section */
.paper-section .tab-btn {
    background: var(--paper-deep);
    border-color: var(--ink-faint);
    color: var(--ink-mute);
}

.paper-section .tab-btn:hover,
.paper-section .tab-btn.active {
    background: var(--vermillion);
    color: #fff;
    border-color: var(--vermillion);
}

/* ── Responsive: tablet ── */
@media (max-width: 900px) {
    .about-me-content {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-top: 32px;
    }
}

/* ── Responsive: mobile navbar — fixed positioning so the
   transform-hide works reliably on iOS Safari (sticky+transform
   is buggy once stuck) ── */
@media (max-width: 768px) {
    .navbar {
        position: fixed;
        left: 0;
        right: 0;
    }

    body {
        padding-top: 64px;
    }

    /* Mobile nav — must live here because these selectors are also
       declared in this inline <style>, which loads after theme.css
       and would otherwise override its mobile rules */
    .nav-menu {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(40, 36, 29, 0.98);
        flex-direction: column;
        align-items: stretch;
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid rgba(244, 237, 224, 0.1);
        z-index: 99;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }
    .nav-menu.active { display: flex; }
    .nav-menu a, .nav-menu .nav-link { font-size: 1rem; }
    .nav-cta { text-align: center; }
    .hamburger { display: flex; }

    /* Dropdown expands inline inside the mobile menu */
    .nav-menu .dropdown { position: static; width: 100%; }
    .nav-menu .dropdown-menu {
        position: static;
        transform: none !important;
        box-shadow: none;
        background: rgba(244, 237, 224, 0.05);
        border: 1px solid rgba(244, 237, 224, 0.1);
        border-radius: 8px;
        min-width: unset;
        width: 100%;
        margin-top: 4px;
        padding: 4px 0;
        display: none;
    }
    .nav-menu .dropdown.open .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    .nav-menu .dropdown-menu a {
        color: var(--ink-faint);
        padding: 8px 16px;
    }
}

/* ── Responsive: mobile ── */
@media (max-width: 640px) {
    /* ── Compact 2-col portfolio: was 1-col × ~450px cards, 4.2 screens ── */
    .portfolio-apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .portfolio-app-card { padding: 16px 10px; }
    .portfolio-app-card .app-icon {
        width: 56px; height: 56px;
        border-radius: 14px; margin-bottom: 10px;
    }
    .portfolio-app-card h3 { font-size: 0.95rem; margin-bottom: 6px; }
    .portfolio-app-card .app-tagline { display: none; }
    .app-badge { font-size: 0.62rem; padding: 3px 9px; }

    /* ── Tighter section rhythm on phones ── */
    .about-me-section, .services, .portfolio-apps-section,
    .podcast-section, .home-reviews-section, .faq-section, .paper-section {
        padding-top: 56px; padding-bottom: 56px;
    }
    .section-header { margin-bottom: 32px; }

    /* Podcast embed: compact player instead of 552px tower */
    .podcast-embed iframe { height: 352px; }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Tighten About Me tab pills so they wrap cleanly */
    .tab-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    /* Shrink hero buttons on very small screens */
    .btn {
        padding: 12px 20px;
        font-size: 0.88rem;
    }

    /* ───── Contact section — mobile polish ───── */
    .contact {
        padding: 56px 20px;
    }

    .contact-quote {
        padding: 18px 18px;
        margin: 20px auto;
    }

    .contact-quote blockquote {
        font-size: 1.05rem;
        line-height: 1.4;
    }

    .contact-context,
    .contact-cta {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-top: 32px;
        max-width: 480px;
    }

    /* Contact info row: side-by-side compact cards instead of
       full-width rows that waste space on phones */
    .contact-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 18px 12px;
        margin-bottom: 0;
        background: var(--paper-soft);
        border: 1px solid var(--ink-faint);
        border-radius: 14px;
    }

    .contact-item i {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .contact-item h4 {
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--ink-mute);
        margin-bottom: 2px;
    }

    .contact-item p {
        font-size: 0.88rem;
        color: var(--ink);
        font-weight: 500;
        word-break: break-word;
    }

    /* Form — full-width inputs with bigger touch targets */
    .contact-form {
        gap: 14px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px;
        /* prevents iOS zoom-on-focus */
        border-radius: 12px;
    }

    .form-group textarea {
        min-height: 130px;
    }

    .contact-form .btn,
    .contact-form button[type="submit"] {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
        font-size: 1rem;
        margin-top: 4px;
    }
}


/* ─── HERO ENTRANCE (one-shot, on load) ─── */
@keyframes rise-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tile-in {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}
.hero-title .hero-subtitle { animation: rise-in 0.5s ease-out backwards 0.05s; }
.hero-title .hero-main     { animation: rise-in 0.5s ease-out backwards 0.13s; }
.hero-title .hero-tagline  { animation: rise-in 0.5s ease-out backwards 0.21s; }
.hero-description          { animation: rise-in 0.5s ease-out backwards 0.29s; }
.hero-buttons              { animation: rise-in 0.5s ease-out backwards 0.37s; }
.hero-stats                { animation: rise-in 0.5s ease-out backwards 0.62s; }
.hero-iconwall a           { animation: tile-in 0.4s cubic-bezier(0.2, 0.7, 0.3, 1.15) backwards; }
.hero-iconwall a:nth-child(1) { animation-delay: 0.15s; }
.hero-iconwall a:nth-child(2) { animation-delay: 0.18s; }
.hero-iconwall a:nth-child(3) { animation-delay: 0.21s; }
.hero-iconwall a:nth-child(4) { animation-delay: 0.24s; }
.hero-iconwall a:nth-child(5) { animation-delay: 0.27s; }
.hero-iconwall a:nth-child(6) { animation-delay: 0.30s; }
.hero-iconwall a:nth-child(7) { animation-delay: 0.33s; }
.hero-iconwall a:nth-child(8) { animation-delay: 0.36s; }
.hero-iconwall a:nth-child(9) { animation-delay: 0.39s; }
.hero-iconwall a:nth-child(10) { animation-delay: 0.42s; }
.hero-iconwall a:nth-child(11) { animation-delay: 0.45s; }
.hero-iconwall a:nth-child(12) { animation-delay: 0.48s; }
.hero-iconwall a:nth-child(13) { animation-delay: 0.51s; }
.hero-iconwall a:nth-child(14) { animation-delay: 0.54s; }
.hero-iconwall a:nth-child(15) { animation-delay: 0.57s; }

@media (prefers-reduced-motion: reduce) {
    .hero-title .hero-subtitle, .hero-title .hero-main, .hero-title .hero-tagline,
    .hero-description, .hero-buttons, .hero-stats, .hero-iconwall a {
        animation: none;
    }
}
