/* components.css — reusable UI blocks: buttons, data/skill cards, forms,
   tool chips, key-skill headlines, video embed, case studies, testimonials. */

.icon_16 {
    width: 16px;
    height: 16px;
}

/* ---- Glossy buttons (shared by landing + contact) ---- */
.glossy-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    font-family: var(--font-body);
    font-size: 12pt;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--panel-edge);
    background:
        linear-gradient(180deg, var(--sheen) 0%, rgba(255,255,255,0) 55%),
        rgba(255, 255, 255, 0.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease,
                border-color 0.2s ease, background 0.2s ease;
}
.glossy-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.glossy-btn svg { display: block; opacity: 0.92; }

.glossy-btn-accent {
    border-color: rgba(95, 191, 149, 0.55);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 55%),
        linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
}
.glossy-btn-accent:hover { border-color: #fff; }

/* =====================  PROJECT / DATA CARDS  ===================== */
/* Light-on-dark cards shared by Projects, Work History, Skills and the
   Community projects, matching the glossy bio panels used elsewhere. */
.item {
    border: 1px solid var(--panel-edge);
    border-top: 2px solid var(--accent);
    border-radius: 10px;
    background:
        linear-gradient(180deg, var(--sheen) 0%, rgba(255,255,255,0) 40%),
        var(--panel);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    color: var(--text-soft);
    padding: 18px 22px;
    margin: 14px 0;
    font-size: 10.5pt;
    line-height: 1.6;
}
.item a { color: var(--accent); }
.item a:hover { color: #fff; }

/* Card header: the icon in a rounded wrapper beside the title block, so the
   name and date no longer wrap awkwardly around a floated image. */
.item-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}
.item-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.item-icon img { width: 34px; height: 34px; object-fit: contain; }
.item-icon i { font-size: 24px; }
.item-headtext { min-width: 0; }
.item-name { font-size: 18pt; font-weight: bold; color: #fff; margin: 0; line-height: 1.2; }
.item-subheader { font-size: 14pt; color: var(--text-soft); margin-top: 2px; }
.item-role { font-size: 14pt; font-weight: bold; color: var(--accent); margin-top: 2px; }

/* Bold <b> lines inside a description read as sub-section headings (the groups
   in Work History). Accent-coloured so they stand out on the dark card. */
.item b {
    display: block;
    font-size: 11.5pt;
    font-weight: 600;
    color: var(--accent);
    margin: 14px 0 4px;
    letter-spacing: 0.3px;
}
/* Each description line is its own block <div>, so the per-line <br> is
   redundant; hiding it keeps the lines tightly spaced. */
.item br { display: none; }
.item-body > div { margin-bottom: 3px; }

/* ---- Demo credentials box ---- */
.demo-box {
    clear: both;
    margin: 16px 0 4px 0;
    padding: 14px 16px 16px 16px;
    border: 1px solid rgba(95, 191, 149, 0.30);
    border-left: 4px solid var(--accent);
    border-radius: 9px;
    background:
        linear-gradient(180deg, rgba(95, 191, 149, 0.12) 0%, rgba(95, 191, 149, 0.04) 100%),
        rgba(255, 255, 255, 0.03);
}
.demo-box-title {
    font-family: var(--font-display);
    font-size: 14pt;
    color: var(--accent);
    margin-bottom: 6px;
}
.demo-box-title i { margin-right: 6px; }
.demo-box-intro {
    font-size: 11pt;
    line-height: 1.55;
    color: var(--text-soft);
    margin-bottom: 12px;
}
.demo-media {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 60vh;      /* cap portrait (9:16) video so it doesn't blow up */
    width: auto;
    height: auto;
    border-radius: 6px;
}
.demo-accounts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.demo-account {
    flex: 1 1 240px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-edge);
    border-radius: 8px;
    padding: 12px 14px;
}
.demo-account-role {
    font-weight: 600;
    font-size: 11pt;
    color: #fff;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--panel-edge);
}
.demo-cred {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.demo-cred-key {
    flex: 0 0 74px;
    font-size: 9.5pt;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-soft);
}
.demo-cred-val {
    font-family: 'Consolas', 'SFMono-Regular', Menlo, monospace;
    font-size: 10.5pt;
    color: #eaf3ee;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--panel-edge);
    border-radius: 5px;
    padding: 2px 8px;
    user-select: all;
}
.demo-account-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 9.5pt;
    word-break: break-all;
}

/* ---- Action buttons (Live Demo / View Source Code) ---- */
.item-actions {
    clear: both;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.item-actions > span { display: contents; }
.proj-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-family: var(--font-body);
    font-size: 11.5pt;
    line-height: 1;
    text-decoration: none !important;
    border-radius: 7px;
    border: 1px solid transparent;
    cursor: pointer;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.proj-btn i { font-size: 11pt; }
.proj-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28); }
.proj-btn-primary {
    color: #fff !important;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
    border-color: rgba(0, 0, 0, 0.08);
}
.proj-btn-primary:hover { filter: brightness(1.06); color: #fff !important; }
.proj-btn-source {
    color: #fff !important;
    background: linear-gradient(180deg, #3b4250 0%, #23272f 100%);
    border-color: rgba(0, 0, 0, 0.15);
}
.proj-btn-source:hover { filter: brightness(1.14); color: #fff !important; }
/* "View project" permalink on the projects list: subtle, so it does not compete
   with a project's own primary action. */
.proj-btn-page {
    color: #fff !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 100%);
    border-color: rgba(255,255,255,0.18);
}
.proj-btn-page:hover { filter: brightness(1.25); color: #fff !important; }

/* ---- "Built with" libraries box ---- */
.item-tools {
    clear: both;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-edge);
    border-radius: 8px;
}
.item-tools-label {
    font-size: 9pt;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-soft);
    margin-right: 2px;
}
.item-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5pt;
    font-style: normal;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--panel-edge);
    border-radius: 20px;
    padding: 4px 12px 4px 8px;
}
.item-tool img,
.item-tool .icon_16 { width: 16px; height: 16px; vertical-align: middle; }
/* Font Awesome fallback glyph for tools without a bitmap icon, sized and
   coloured to sit alongside the 16px PNG icons in the chip. */
.item-tool .tool-fa {
    width: 16px;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    color: var(--accent);
}

@media (max-width: 600px) {
    .demo-account { flex: 1 1 100%; }
    .proj-btn { flex: 1 1 100%; justify-content: center; }
}

/* =====================  WORK HISTORY NOTE  ===================== */
.resume-note {
    background:
        linear-gradient(180deg, rgba(95,191,149,0.12) 0%, rgba(95,191,149,0.04) 100%);
    border: 1px solid rgba(95, 191, 149, 0.4);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px;
    font-size: 11pt;
    color: var(--text-soft);
}
.resume-note a { color: var(--accent); }
.resume-note a:hover { color: #fff; }

/* =====================  KEY SKILLS (headline credentials)  ===================== */
/* Featured cards at the top of the Skills and AI pages. They reuse the exact
   same layout and Inter typography as the regular .item cards (icon bubble +
   title + subtitle), and only swap the background for a distinctive green
   (Skills) or orange (AI) gradient so they read as headline credentials. */
.key-skills {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0 14px 0;
}
.key-skills .item { margin: 0; }               /* the flex gap controls spacing */
.item-key {
    border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
    border-top: 2px solid var(--accent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 55%),
        linear-gradient(135deg, var(--accent-deep) 0%, #16271e 100%);
}
.item-key .item-head { margin-bottom: 0; }     /* no description body beneath */
.item-key .item-subheader { color: rgba(255, 255, 255, 0.85); }
.item-key .item-subheader a { color: #fff; text-decoration: underline; }
.item-key .item-subheader a:hover { opacity: 0.85; }

/* Orange variant, used on the AI page. */
.item-key--orange {
    border-color: rgba(240, 162, 75, 0.6);
    border-top-color: #f0a24b;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 55%),
        linear-gradient(135deg, #d2772a 0%, #2a1a0c 100%);
}

/* Responsive 16:9 video embed (e.g. the YouTube clip on the AI page). */
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 4px 0 20px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--panel-edge);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
    background: #000;
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* =====================  CASE STUDY BOXES (Public Policy)  ===================== */
.case-study-grid {
    clear: both;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.case-study-box {
    display: block;
    text-decoration: none;
    color: var(--text-soft) !important;
    background:
        linear-gradient(180deg, var(--sheen) 0%, rgba(255,255,255,0) 60%),
        rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-edge);
    border-top: 2px solid var(--accent);
    border-radius: 10px;
    padding: 14px 16px;
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.4);
}
.case-study-box:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 11px 24px rgba(0, 0, 0, 0.55);
}
.case-study-region {
    font-family: var(--font-display);
    font-size: 15pt;
    color: #fff;
    margin-bottom: 5px;
}
.case-study-blurb {
    font-size: 10pt;
    line-height: 1.5;
}

/* =====================  CONTACT FORM  ===================== */
.bio-contact-intro { font-size: 11.5pt; color: var(--text-soft); margin-bottom: 18px; }
.bio-contact-intro a { color: var(--accent); }

.contact-form { max-width: 620px; }
.form-row { margin-bottom: 14px; }
.form-row label {
    display: block;
    font-size: 10.5pt;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 5px;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: 11.5pt;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--panel-edge);
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(95, 191, 149, 0.18);
}
.contact-form textarea { resize: vertical; }

.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.contact-form .glossy-btn { border: none; }
.contact-form button[disabled] { opacity: 0.6; cursor: default; }

.contact-status { font-size: 10.5pt; }
.contact-status.success { color: var(--accent); }
.contact-status.error   { color: #ff8a7a; }

/* Honeypot: invisible to humans, present for bots to trip over. */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Font-library icon for skill cards (analytical skills), sized and aligned to
   match the 48x48 image icons on the other cards. Cards have a light
   background, so the icon uses a dark accent colour. */
.skill-faicon {
    float: left;
    width: 48px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    font-size: 30px;
    padding: 5px;
    color: #2e8b57;
}


/* --- Testimonials carousel (landing page) ------------------------------- */
.testimonials {
    max-width: 820px;
    margin: 34px auto 8px;
    padding: 0 16px;
    text-align: center;
}
.testimonials-kicker {
    font-size: 10.5pt;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}
.testimonials-track {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--panel-edge);
    border-radius: 14px;
    padding: 28px 30px 24px;
    min-height: 210px;               /* holds height so pips don't jump between quotes */
    display: flex;
    align-items: center;
    justify-content: center;
}
.testimonial {
    display: none;
    margin: 0;
    max-width: 640px;
}
.testimonial.is-active { display: block; animation: testimonial-fade 0.5s ease; }
@keyframes testimonial-fade { from { opacity: 0; } to { opacity: 1; } }
.testimonial-photo {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    margin-bottom: 14px;
}
.testimonial-quote {
    font-size: 12pt;
    line-height: 1.6;
    color: var(--text-soft);
    margin: 0 0 16px;
    font-style: italic;
}
.testimonial-meta { display: flex; flex-direction: column; gap: 2px; }
.testimonial-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}
.testimonial-name:hover { color: var(--accent); }
.testimonial-role { font-size: 10.5pt; color: var(--text-soft); }
.testimonials-pips { display: flex; justify-content: center; gap: 9px; margin-top: 16px; }
.testimonials-pip {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--panel-edge);
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
}
.testimonials-pip:hover { background: rgba(255, 255, 255, 0.4); }
.testimonials-pip.is-active { background: var(--accent); transform: scale(1.25); }
@media (prefers-reduced-motion: reduce) {
    .testimonial.is-active { animation: none; }
}
