/* Joanah Fermin — theme on top of Pico CSS.
   Palette follows the original site: warm beige header, lavender wave, pink/red accents,
   black footer; logo blue/magenta for interactive color. */

:root:not([data-theme=dark]),
[data-theme=dark] {
    --beige: #f2ede9;
    --lavender: #eeeaff;
    --pink: #ffc8c8;
    --red: #e8453c;
    --logo-blue: #4f9fd0;
    --logo-magenta: #b93bb0;
    --ink: #2b2b33;
    --muted: #6b6b76;
    --line: #9c9c9c;

    --pico-primary: var(--logo-magenta);
    --pico-primary-background: var(--logo-magenta);
    --pico-primary-border: var(--logo-magenta);
    --pico-primary-hover: #8f2a88;
    --pico-primary-hover-background: #8f2a88;
    --pico-primary-hover-border: #8f2a88;
    --pico-primary-focus: rgba(185, 59, 176, 0.35);
    --pico-primary-underline: rgba(185, 59, 176, 0.5);
    --pico-primary-hover-underline: #8f2a88;
    --pico-color: var(--ink);
    --pico-font-size: 106%;
}

html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; background: #fff; }
main { flex: 1 0 auto; }
main > h1, main > p, main > ul, main > ol, main > blockquote, main > h2, main > h3 {
    width: 100%; max-width: 1100px; margin-left: auto; margin-right: auto; padding: 0 1.25rem;
}
main > h1 { margin-top: 2.5rem; }

/* Header: one row — logo, menu, spacer, social */
#main-header { background: var(--beige); }
#main-header .container, footer .container { max-width: 1200px; padding-left: 1.25rem; padding-right: 1.25rem; }
.navbar { display: flex; align-items: center; gap: 2rem; min-height: 4.25rem; }
.brand { display: flex; line-height: 0; }
.menu { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.menu li { padding: 0; margin: 0; list-style: none; }
.menu li::marker, .menu li::before { content: none; }
.menu a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.menu a:hover { color: var(--logo-magenta); }
.social { display: flex; gap: .5rem; margin-left: auto; }
.social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.1rem; height: 2.1rem; border-radius: 6px; color: #fff;
}
.social-github { background: #2b2b2b; }
.social-linkedin { background: #2f6fb5; }
.social a:hover { opacity: .85; }
.hamburger { display: none; background: none; border: 0; box-shadow: none; width: auto; margin: 0; padding: 0 .25rem; font-size: 1.6rem; color: var(--ink); cursor: pointer; }

@media (max-width: 640px) {
    .navbar { flex-wrap: wrap; gap: .75rem 1rem; padding-top: .6rem; padding-bottom: .6rem; }
    .hamburger { display: block; }
    .menu { display: none; order: 3; width: 100%; flex-direction: column; gap: .75rem; padding: .25rem 0 .5rem; }
    #main-header.menu-open .menu { display: flex; }
}

/* Home sections */
.section { padding: 4rem 0; }
.section-inner { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

.intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--muted); margin: 0 0 .75rem; }
.intro h1 { text-align: left; font-size: 2.4rem; line-height: 1.2; margin: 0 0 1rem; padding: 0; }
.intro h1::after { display: none; }
.intro p { color: var(--ink); }
.intro .actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.portrait { position: relative; margin: 0; }
.portrait img { display: block; width: 100%; height: auto; border-radius: 4px; }
@media (max-width: 760px) {
    .intro { grid-template-columns: 1fr; gap: 2rem; }
    .portrait { max-width: 420px; }
}

/* Section heading with rules either side */
.rule-heading { display: flex; align-items: center; gap: 1.25rem; margin: 0 0 2.5rem; font-weight: 400; font-size: 1.5rem; color: var(--muted); }
.rule-heading::before, .rule-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Lavender band */
.band { background: var(--lavender); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card {
    background: #fff; padding: 1.75rem 1.5rem; border-radius: 4px;
    box-shadow: 0 6px 24px rgba(80, 60, 140, .08);
}
.card .icon { color: var(--pink); font-size: 2.2rem; font-family: monospace; font-weight: 700; line-height: 1; margin-bottom: 1rem; }
.card h3 { color: var(--red); font-size: 1.2rem; margin: 0 0 .5rem; }
.card p { margin: 0; color: var(--ink); font-size: .95rem; }

/* Posts / generic content (generator-emitted classes) */
.container { max-width: 1100px; }
article { max-width: 1100px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.post-meta { margin-bottom: 1.5rem; }
.post-date { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .95rem; }
.post-date img { border-radius: 6px; }
.featured-image { width: 100%; border-radius: 4px; margin-top: 1rem; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid #ddd; }
.post-nav a { font-weight: 600; text-decoration: none; }
.post-nav-next { margin-left: auto; text-align: right; }

.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.post-list-item { background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 6px 24px rgba(80, 60, 140, .08); transition: transform .2s ease; }
.post-list-item:hover { transform: translateY(-3px); }
.post-list-item a { display: block; color: inherit; text-decoration: none; padding-bottom: 1rem; }
.post-list-item .thumb { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-list-date { color: var(--muted); font-size: .85rem; padding: .75rem 1rem 0; }
.post-list-item h2 { font-size: 1.2rem; margin: .25rem 1rem 0; color: var(--red); }
.pagination { text-align: center; margin: 2rem 0; }
.pagination a, .pagination strong { display: inline-block; padding: .2rem .7rem; border-radius: 999px; }
.pagination strong { background: var(--logo-magenta); color: #fff; }

/* Footer */
footer { flex-shrink: 0; background: #000; color: #ddd; padding: 1.5rem 0; }
footer .container { display: flex; align-items: center; gap: 1rem; }
.footer-copy { font-size: .8rem; letter-spacing: .02em; }

/* Experience cards and skill tags */
.cards { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-meta { color: var(--muted) !important; font-size: .85rem !important; margin-bottom: .75rem !important; }
.card p + p { margin-top: .6rem; }
.card.earlier { margin-top: 1.5rem; }
.card.earlier ul { margin: 0; padding-left: 1.1rem; }
.card.earlier li { margin-bottom: .6rem; font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.tags li { margin: 0; padding: .3rem .85rem; border-radius: 999px; background: var(--lavender); color: var(--ink); font-size: .9rem; list-style: none; }

/* Experience layout rows: featured full-width, pairs, and a wide-lead row */
.cards.one { grid-template-columns: 1fr; }
.cards + .cards { margin-top: 1.5rem; }
.cards.lead-wide { grid-template-columns: 2fr 1fr; }
.card.featured { border-top: 4px solid var(--red); }
@media (max-width: 760px) { .cards.lead-wide { grid-template-columns: 1fr; } }

/* Hero: the tagline is the main message */
.intro .eyebrow { font-size: 1rem; font-weight: 600; letter-spacing: .04em; text-transform: none; color: var(--ink); }
.intro h1 { font-size: 3.2rem; line-height: 1.1; font-weight: 800; margin-bottom: 1.25rem; }
.intro h1 .accent {
    background: linear-gradient(90deg, var(--logo-blue), var(--logo-magenta));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro > div > p:not(.eyebrow) { font-size: 1.15rem; max-width: 30em; }
@media (max-width: 760px) { .intro h1 { font-size: 2.4rem; }  }
.intro h1 { font-size: 2.9rem; }
.intro h1 .accent { white-space: nowrap; }
@media (max-width: 760px) { .intro h1 { font-size: 2.3rem; } }

/* Hero hierarchy: name (small) > role (large) > belief headline (medium) */
.intro .eyebrow { margin-bottom: .25rem; }
.intro > div > p.role { font-size: 2.1rem; font-weight: 800; line-height: 1.15; color: var(--ink); margin: 0 0 .9rem; white-space: nowrap; }
.intro h1 { font-size: 2.1rem; font-weight: 700; margin-bottom: 1rem; }
@media (max-width: 760px) { .intro > div > p.role { font-size: 1.8rem; } .intro h1 { font-size: 1.7rem; } }

/* Whole headline carries the gradient; the span only keeps its words together */
.intro h1 {
    background: linear-gradient(90deg, var(--logo-blue), var(--logo-magenta));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    width: fit-content;
}
.intro h1 .accent { background: none; color: inherit; -webkit-text-fill-color: transparent; }
.intro h1 { line-height: 1.2; padding-bottom: .12em; }

/* Skills strip under the hero: three cards, AI emphasized */
.section.intro-section { padding-bottom: 2rem; }
.section.skills-strip { padding: 0 0 3.5rem; }
.skills-strip .rule-heading { margin-bottom: 1.5rem; }
.skill-cards { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1.5rem; }
.skill-card {
    background: #fff; border-radius: 4px; padding: 1.4rem 1.5rem 1.2rem;
    border-top: 4px solid var(--logo-blue); box-shadow: 0 6px 24px rgba(80, 60, 140, .08);
}
.skill-card.practice { border-top-color: var(--pink); }
.skill-card.ai {
    border-top-color: var(--logo-magenta); background: linear-gradient(160deg, #fff 55%, var(--lavender));
}
.skill-card h3 { font-size: 1.1rem; margin: 0 0 .75rem; color: var(--red); }
.skill-card.ai h3 { color: var(--logo-magenta); }
.skill-card ul { list-style: none; margin: 0; padding: 0; }
.skill-card li { margin: 0 0 .45rem; padding: 0; list-style: none; font-size: .95rem; }
.skill-card li::marker { content: none; }
@media (max-width: 760px) { .skill-cards { grid-template-columns: 1fr; } }

/* Skill cards: tighter lists, AI card emphasized and filled */
.skill-card li { margin-bottom: .3rem; }
.skill-card.ai li { font-size: 1.1rem; font-weight: 700; margin-bottom: .4rem; }
.skill-card .note { margin: .9rem 0 0; font-size: .9rem; color: var(--muted); }
.skill-card.ai { border-top-width: 6px; }

/* Skills cards follow the hero directly, no heading */
.section.intro-section { padding-bottom: 2.5rem; }
.skill-cards { grid-template-columns: 1fr 1.45fr .9fr; }
@media (max-width: 760px) { .skill-cards { grid-template-columns: 1fr; } }

/* Process section: "Before the first line of code" */
.section.process { background: var(--beige); padding: 3.5rem 0 3.25rem; }
.process-title { font-size: 1.9rem; font-weight: 800; color: var(--ink); text-align: left; margin: 0 0 .3rem; }
.process-sub { color: var(--muted); margin: 0 0 2rem; }
.process-label { display: flex; align-items: center; gap: .9rem; margin: 0 0 1rem; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.process-label::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .35; }
.process-label.before { color: var(--logo-magenta); }
.process-label.after { color: var(--logo-blue); margin-top: 2rem; }
.process-label.improve { color: var(--logo-magenta); margin-top: 2rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.step { position: relative; background: #fff; border-radius: 4px; padding: 1.25rem 1.4rem 1.3rem; box-shadow: 0 6px 24px rgba(80, 60, 140, .08); border-top: 4px solid var(--logo-magenta); }
.step.after { border-top-color: var(--logo-blue); }
.step-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--logo-magenta); color: #fff; font-weight: 700; font-size: .95rem; }
.step.after .step-num { background: var(--logo-blue); }
.step-icon { color: var(--logo-magenta); }
.step.after .step-icon { color: var(--logo-blue); }
.step h3 { font-size: 1.15rem; font-weight: 800; color: var(--ink); margin: 0 0 .35rem; }
.step p { margin: 0; font-size: .95rem; color: var(--ink); }
.step:not(:last-child)::after { content: "\2192"; position: absolute; right: -1.45rem; top: 50%; transform: translateY(-50%); font-size: 1.1rem; color: var(--muted); }
@media (max-width: 760px) {
    .steps { grid-template-columns: 1fr; gap: 1.1rem; }
    .step:not(:last-child)::after { content: none; }
    .process-title { font-size: 1.6rem; }
}

/* Seven-step layout: four squares in the second row, plus the house-rule bar */
.steps.four { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.steps.four .step { padding: 1.15rem 1.15rem 1.2rem; }
.steps.four .step:not(:last-child)::after { right: -1.3rem; }
.steps.four .step p { font-size: .92rem; }
.process-rule { display: flex; align-items: center; gap: .9rem; margin-top: 2rem; padding: .85rem 1.25rem; background: var(--lavender); border-left: 4px solid var(--logo-magenta); border-radius: 4px; }
.process-rule .step-icon { flex: none; color: var(--logo-magenta); }
.process-rule p { margin: 0; font-size: 1rem; color: var(--ink); }
.process-label.improve + .process-rule { margin-top: 0; }
.process-rule + .process-rule { margin-top: .75rem; }
@media (max-width: 980px) { .steps.four { grid-template-columns: repeat(2, 1fr); } .steps.four .step:nth-child(2)::after { content: none; } }
@media (max-width: 760px) { .steps.four { grid-template-columns: 1fr; } }

/* House-rule bar: dark, matches the footer */
.process-rule { background: var(--ink); border-left: 4px solid var(--pink); }
.process-rule .step-icon { color: var(--pink); }
.process-rule p, .process-rule p strong { color: #fff; }

/* House-rule bar: logo gradient (deepened for white-text contrast) */
.process-rule { background: linear-gradient(90deg, #3b78a8, #a8329f); border-left: 0; }
.process-rule .step-icon { color: #fff; }

/* House-rule bar: calm. White like the squares, thin gradient edge */
.process-rule {
    background: #fff; border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, var(--logo-blue), var(--logo-magenta)) 1;
    border-radius: 0; box-shadow: 0 6px 24px rgba(80, 60, 140, .08);
}
.process-rule .step-icon { color: var(--logo-magenta); }
.process-rule p, .process-rule p strong { color: var(--ink); }

/* Keep the longer role line inside the screen on phones */
.intro > div { min-width: 0; }
@media (max-width: 760px) { .intro > div > p.role { font-size: 1.45rem; white-space: normal; } }

/* Accenture (short) beside QC City Hall (wide, featured) */
.cards.exp-pair { grid-template-columns: 1fr 2fr; align-items: start; }
@media (max-width: 760px) { .cards.exp-pair { grid-template-columns: 1fr; } }

/* Accenture and QC City Hall: equal height, widths balanced so the text fills both */
.cards.exp-pair { grid-template-columns: 1fr 1.3fr; align-items: stretch; }
@media (max-width: 760px) { .cards.exp-pair { grid-template-columns: 1fr; } }
.cards.exp-pair { grid-template-columns: .85fr 1.5fr; }
@media (max-width: 760px) { .cards.exp-pair { grid-template-columns: 1fr; } }

/* Experience band: soft logo-colored gradient instead of flat lavender */
.band { background: linear-gradient(180deg, #e8f1ff 0%, #f3e9ff 50%, #ffeaf2 100%); }

/* Beliefs: plain white section after the experience band */
.section.beliefs { background: #fff; padding: 3.5rem 0 4rem; }
.belief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 3rem; }
.belief { padding-left: 1rem; border-left: 4px solid transparent; border-image: linear-gradient(180deg, var(--logo-blue), var(--logo-magenta)) 1; }
.belief h3 { font-size: 1.15rem; color: var(--ink); margin: 0 0 .35rem; }
.belief p { margin: 0; font-size: .95rem; color: var(--muted); }
@media (max-width: 760px) { .belief-grid { grid-template-columns: 1fr; } }

/* Beliefs: closing line with large vertical space around it */
.section.closing { background: var(--lavender); padding: 0; }
.beliefs-close { max-width: 720px; margin: 0 auto; padding: 7rem 1.25rem 8rem; text-align: center; font-size: 1.5rem; line-height: 1.5; font-weight: 600; color: var(--ink); }
@media (max-width: 760px) { .beliefs-close { padding: 5rem 1.25rem 5.5rem; font-size: 1.25rem; } }

/* Closing line: bigger, with the three ideas picked out in logo magenta */
.beliefs-close { max-width: 820px; font-size: 2.2rem; line-height: 1.35; font-weight: 800; letter-spacing: -.01em; }
.beliefs-close::before { content: ""; display: block; width: 64px; height: 5px; border-radius: 3px; margin: 0 auto 2rem; background: var(--logo-magenta); }
.beliefs-close em { font-style: normal; color: #a8329f; }
@media (max-width: 760px) { .beliefs-close { font-size: 1.5rem; } }

/* Courses */
.course-listing h1 { margin: 0 0 2rem; }
.course-intro { max-width: 720px; margin: 0 0 2.5rem; padding-left: 1.25rem; border-left: 4px solid var(--logo-magenta); font-size: 1.1rem; line-height: 1.6; }
.course-intro p { margin: 0 0 .8rem; }
.course-intro p:last-child { margin: 0; }
.course-intro em { font-style: normal; font-weight: 700; color: #a8329f; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.course-card { display: block; background: #fff; border-top: 4px solid var(--red); border-radius: 4px; padding: 1.5rem; color: inherit; text-decoration: none; box-shadow: 0 6px 24px rgba(80, 60, 140, .08); transition: transform .2s ease; }
.course-card:hover { transform: translateY(-3px); }
.course-card h2 { font-size: 1.25rem; color: var(--red); margin: .5rem 0; }
.course-card p { font-size: .95rem; color: var(--ink); margin: 0 0 1rem; }
.course-count { font-size: .85rem; color: var(--muted); }
.course-status { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #a8329f; background: var(--lavender); padding: .15rem .6rem; border-radius: 999px; }
.course-index h1 { margin: 0 0 .5rem; }
.course-desc { color: var(--muted); margin: 1rem 0 0; }
.lesson-list { margin: 2rem 0 0; padding-left: 1.5rem; }
.lesson-list li { margin-bottom: .6rem; }
.lesson-list a { font-weight: 600; text-decoration: none; }
.lesson { max-width: 1100px; }
.lesson-crumb { font-size: .9rem; color: var(--muted); margin: 1rem 0 1.5rem; }
.lesson-crumb a { text-decoration: none; }
.lesson-toc { background: var(--lavender); border-radius: 4px; padding: .9rem 1.25rem; margin-bottom: 2rem; }
.lesson-toc summary { font-weight: 700; cursor: pointer; }
.lesson-toc ol { margin: .75rem 0 0; padding-left: 1.25rem; font-size: .95rem; }
.lesson-toc li { margin-bottom: .3rem; }
.lesson-toc a { text-decoration: none; }
.lesson-body pre { overflow-x: auto; }
.lesson-body .code-block { border: 1px solid var(--pico-muted-border-color, #d0d5dd); border-radius: 4px; margin-bottom: var(--pico-typography-spacing-vertical, 1rem); overflow: hidden; }
.lesson-body .code-block pre { margin: 0; border-radius: 0; }
.lesson-body h2 { scroll-margin-top: 1rem; }

/* Courses listing: one course per row, lesson list shown inline */
.course-grid { grid-template-columns: 1fr; }
.course-card h2 a { color: inherit; text-decoration: none; }
.course-card h2 a:hover { text-decoration: underline; }
.course-card .lesson-list { margin-top: 1rem; font-size: .95rem; }
.course-card .lesson-list a { font-weight: 500; color: var(--ink); }
.course-card .lesson-list a:hover { color: var(--logo-magenta); }

/* Course lesson links: look like links */
.course-card .lesson-list a { color: #a8329f; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(168, 50, 159, .35); text-underline-offset: 3px; }
.course-card .lesson-list a:hover { color: #8f2a88; text-decoration-color: currentColor; }

/* Lesson diagrams (inline SVG): shared look so each diagram stays short */
.lesson-body svg { display: block; width: 100%; max-width: 640px; height: auto; margin: 1.75rem auto; }
.lesson-body svg text { fill: #2b2b33; font-size: 16px; }
.lesson-body svg .tb { font-weight: 700; }
.lesson-body svg .tm { fill: #6b6b76; font-size: 14px; }
.lesson-body svg .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; }
.lesson-body svg .c { text-anchor: middle; }
.lesson-body svg .big { font-size: 20px; }
.lesson-body svg .blue { fill: #e8f1ff; stroke: #4f9fd0; stroke-width: 1.5; }
.lesson-body svg .mag { fill: #f6e8f5; stroke: #b93bb0; stroke-width: 1.5; }
.lesson-body svg .red { fill: #ffeaf2; stroke: #e8453c; stroke-width: 1.5; }
.lesson-body svg .grey { fill: #f3f3f5; stroke: #6b6b76; stroke-width: 1.5; }
.lesson-body svg .line { stroke: #2b2b33; stroke-width: 1.5; fill: none; }
.lesson-body svg .dash { stroke: #9c9c9c; stroke-width: 1.5; stroke-dasharray: 5 5; fill: none; }

/* Inline code inside lesson headings: keep it in proportion */
.lesson-body :is(h2, h3, h4) code { font-size: .8em; padding: .1em .4em; }
