/* ==========================================================================
   PAGE-SPECIFIC: blog article, blog listing, resume, contact form, case
   study, homepage Featured Work grid
   ========================================================================== */

/* --- Homepage: Featured Work asymmetric grid ---
   Three cards: two stack in the first column, the video card spans both
   rows in the second column so the demo gets real vertical presence
   instead of being squeezed into a same-height row with the others.
   grid-auto-flow's default packing does the column assignment for us:
   card 1 fills col1/row1, the row-span-2 video card claims col2 (both
   rows), card 3 falls into the only cell left, col1/row2. */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.featured-video-card { grid-row: span 2; }

/* --- Case study: code excerpts + prose rhythm --- */
.case-card { margin-bottom: 30px; }

.code-block {
    background: #1d1d1f;
    color: #e5e5ea;
    border-radius: 16px;
    padding: 20px 24px;
    overflow-x: auto;
    margin: 20px 0 8px;
}

.code-block code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre;
}

.code-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 20px 4px;
}

.case-text { line-height: 1.7; margin-bottom: 15px; }

/* Case-study demo video. The wrap is a real <button> (play/pause works from
   the keyboard too), so button chrome is reset here; .video-cta (defined
   below, shared with the homepage card video) signals it's playable so a
   viewer who catches it mid-pause doesn't mistake it for a screenshot. */
.demo-video-wrap {
    position: relative;
    display: block;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    cursor: pointer;
}

/* height: auto beats the height="" attribute's presentational hint, so the
   box height comes from the attributes' aspect ratio, not their pixel value. */
.demo-video { display: block; width: 100%; height: auto; }

/* Inline demo video on a product card (e.g. Rogue Roll on the homepage).
   The wrap is a real <button> that opens the lightbox, stacked above the
   card's stretched App Store link. flex: 1 1 auto lets the video claim
   whatever slack space the featured grid's row-stretch hands its card,
   rather than a hand-picked pixel height that would only look right at
   one viewport width; min-height keeps it from collapsing when there's
   no extra space to absorb (e.g. the single-column mobile layout). The
   video is absolutely positioned to fill the wrap so growth doesn't
   distort its cropped aspect ratio. */
.card-video-wrap {
    position: relative;
    z-index: 1; /* above .card-link--overlay's ::after */
    flex: 1 1 auto;
    min-height: 180px;
    margin: 4px 0 16px;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    cursor: pointer;
}

.card-video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Small overlay pill so a demo video reads as playable content instead
   of a static screenshot. pointer-events: none lets clicks fall through
   to the wrap's own handler regardless of where on the badge they land. */
.video-cta {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
}
.video-cta svg { flex-shrink: 0; }

/* --- Blog article --- */
.back-link {
    color: var(--link-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hero-banner {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 24px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.author-block {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(128,128,128,0.2);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f0f5;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.author-meta {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.05rem;
}

.publish-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-body p {
    margin-bottom: 1.8rem;
}

.article-link {
    color: var(--link-blue);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    transition: opacity 0.2s ease;
}
.article-link:hover { opacity: 0.7; }

/* Section headings inside long-form legal text (privacy.html); scaled down
   from the 2.2rem page-level h2 so they read as parts of one document. */
.article-body h2 {
    font-size: 1.4rem;
    letter-spacing: -0.01em;
    margin: 2.4rem 0 0.8rem;
}

.article-chart {
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 40px 0;
    background: white;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 4px 15px var(--shadow-light);
    border: 1px solid var(--card-border);
}

/* --- Blog listing --- */
.post-card {
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: hidden; /* Keeps the top corners rounded for the image */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card .card-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.post-meta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin: 0;
}

.post-title {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
}

.post-excerpt {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.blog-thumbnail {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-bottom: 1px solid var(--card-border);
    display: block;
}

/* --- Resume --- */
.resume-section-title {
    margin: 0 0 24px;
    font-size: 1.5rem;
    border-left: 4px solid var(--ios-blue);
    padding-left: 15px;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 5px 12px;
}
.role-title { font-weight: 700; font-size: 1.15rem; color: var(--text-color); }
.company-name { font-weight: 500; color: var(--text-muted); font-size: 1rem; }
.date-range { font-size: 0.9rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Role/school logos. Each entry shows a coloured initial monogram by default;
   to use a real logo just drop an <img> inside the .org-logo span, e.g.
   <span class="org-logo"><img src="img/logos/csu.png" alt=""></span> */
.resume-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.org-logo {
    flex-shrink: 0;
    box-sizing: border-box; /* keep all tiles 46px even when --brand adds padding */
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    overflow: hidden;
}
.org-logo img { width: 100%; height: 100%; object-fit: cover; }
/* Brand logos sit on a white tile with padding (LinkedIn-style) so any mark,
   colour, or transparency reads cleanly in both light and dark themes. */
.org-logo--brand,
.org-logo--hussmann { background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.12), inset 0 0 0 1px rgba(0,0,0,0.06); }
.org-logo--brand { padding: 6px; }
.org-logo--brand img { object-fit: contain; }
/* Hussmann: white tile, big brand-blue "H" monogram (stand-in for the wordmark) */
.org-logo--hussmann { color: #0047ab; font-size: 1.6rem; }

.resume-list { list-style-type: none; padding: 0; margin: 0; }
.resume-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
.resume-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--ios-blue);
    font-weight: bold;
}

/* --- Contact form (iOS-style inputs) --- */
.form-group {
    margin-bottom: 24px;
}

/* Full-opacity labels: the old 0.8 fade dropped them below AA contrast */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

/* Leading icon next to each contact-form label */
.form-group label { display: flex; align-items: center; gap: 7px; }
.field-icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--ios-blue); }

textarea { resize: vertical; }

/* Formspree honeypot field; humans never see or tab to it */
.gotcha-field { display: none; }

input, textarea {
    width: 100%;
    padding: 16px;
    border-radius: 16px; /* Super rounded iOS style */
    border: 1px solid rgba(0,0,0,0.1);
    background-color: rgba(255,255,255,0.6); /* Semi-transparent */
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-sizing: border-box;
    -webkit-appearance: none;
}

/* The "active" state: Apple blue glow */
input:focus, textarea:focus {
    outline: none;
    background-color: white;
    border-color: var(--ios-blue);
    box-shadow: 0 0 0 4px rgba(0,122,255,0.15);
    transform: scale(1.01);
}

/* --- Contact: success panel + alternate-contact line --- */
.success-icon { display: block; margin: 0 auto 16px; }
.success-title { margin: 0 0 8px; }
.contact-alt {
    text-align: center;
    color: var(--text-muted);
    margin-top: 30px;
    font-size: 0.9rem;
}

/* --- Resume: card rhythm --- */
.resume-card  { margin-bottom: 30px; }
.resume-entry { margin-bottom: 30px; }

/* --- About: card titles, body copy, skills grid --- */
.about-card-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}
.about-card-title--lg { font-size: 1.8rem; margin-bottom: 30px; }

.about-text { color: var(--text-muted); line-height: 1.7; font-size: 1rem; }

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}
.skill-group-label {
    display: block;
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* --- Blog listing: card footer + "coming soon" pill --- */
.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 10px;
}
.image-credit { font-size: 0.65rem; color: var(--text-muted); }
.coming-soon { text-align: center; margin-top: 40px; margin-bottom: 8px; }
/* Accent tint (rather than the neutral card-bg used elsewhere) so this
   reads as a live status, not a faded placeholder. */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 100px;
    background: rgba(0, 122, 255, 0.12);
    border: 1px solid rgba(0, 122, 255, 0.25);
    color: #0055aa; /* --link-blue only hits 4.4:1 on this tinted bg; this clears 6:1 */
    font-size: 0.9rem;
    font-weight: 600;
}
.pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ios-blue);
    animation: pill-pulse 1.8s ease-in-out infinite;
}
@keyframes pill-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* --- Blog article header --- */
.article-backbar { max-width: 800px; margin: 40px auto 20px; }
.article-wrap { max-width: 800px; margin: 0 auto 60px; }
.article-title {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 2.4rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
