/* PromptUX — Thinking blog shared styles.
   Mirrors the editorial-theme tokens from the homepage so the
   blog reads as a continuation of the main site. */

:root {
    --paper:     oklch(0.992 0.002 240);
    --paper-2:   oklch(0.965 0.003 240);
    --paper-3:   oklch(0.93  0.004 240);
    --ink:       oklch(0.20  0.005 240);
    --mid:       oklch(0.56  0.005 240);
    --rule:      oklch(0.20  0.005 240 / 0.10);
    --display:   -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
    --body:      -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
    --ed-space-1: 8px;
    --ed-space-2: 16px;
    --ed-space-3: 24px;
    --ed-space-4: 48px;
    --ed-space-5: 80px;
    --ed-space-6: 128px;
    --ed-max: 1240px;
    --gutter: clamp(20px, 5vw, 80px);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

/* === NAV — unified with main site pages === */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ed-space-3);
    padding: 18px var(--gutter);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.nav.is-scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom-color: var(--rule);
}
.nav-logo {
    font-family: var(--display);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.005em;
    color: var(--ink);
    text-decoration: none;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.4vw, 32px);
    list-style: none;
    margin: 0 auto;
    padding: 0;
}
.nav-links > li { list-style: none; }
.nav-links a {
    font-family: var(--body);
    font-weight: 400;
    font-size: 13px;
    letter-spacing: -0.005em;
    color: var(--ink);
    text-decoration: none;
    opacity: 0.78;
    transition: opacity 150ms ease;
}
.nav-links a:hover { opacity: 1; }

/* Overflow "···" — internal page access, visually quieter than main nav */
.nav-overflow {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.nav-overflow__btn {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 4px 6px;
    cursor: pointer;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.55;
    transition: opacity 150ms ease;
}
.nav-overflow__btn:hover,
.nav-overflow__btn[aria-expanded="true"] { opacity: 0.9; }
.nav-overflow__btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}
.nav-overflow__menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: rgba(250, 250, 248, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px dashed var(--rule);
    border-radius: 8px;
    padding: 8px 0 6px;
    min-width: 160px;
    box-shadow: 0 8px 20px rgba(12, 12, 10, 0.06);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 100;
}
.nav-overflow__btn[aria-expanded="true"] + .nav-overflow__menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.nav-overflow__eyebrow {
    margin: 0 16px 4px;
    font-family: var(--body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mid);
    opacity: 0.7;
}
.nav-overflow__menu a {
    display: block;
    padding: 6px 16px;
    font-family: var(--body);
    font-size: 12px;
    color: var(--mid);
    text-decoration: none;
    transition: background 150ms ease, color 150ms ease;
}
.nav-overflow__menu a:hover {
    background: var(--paper-2);
    color: var(--ink);
}

/* CTA pill — sits right next to the overflow icon at the right edge
   (right-alignment comes from `.nav-links { margin: 0 auto }` consuming
   the free space between the logo and this cluster). */
.nav-cta {
    background: var(--ink);
    color: var(--paper);
    border-radius: 980px;
    border: 0;
    font-family: var(--body);
    font-weight: 400;
    font-size: 13px;
    letter-spacing: -0.005em;
    padding: 9px 18px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 150ms ease;
}
.nav-cta:hover { background: oklch(0.30 0.005 240); color: var(--paper); }

/* Hamburger */
.nav-toggle {
    display: none;
    appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.nav-toggle__bar {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 200ms ease, opacity 200ms ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .nav { flex-wrap: wrap; }
    .nav-links {
        order: 3;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 240ms ease, opacity 200ms ease, margin 200ms ease;
        margin: 0;
    }
    .nav-cta {
        order: 4;
        flex-basis: 100%;
        text-align: center;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        padding-top: 0;
        padding-bottom: 0;
        transition: max-height 240ms ease, opacity 200ms ease, padding 200ms ease, margin 200ms ease;
        margin: 0;
    }
    .nav[data-open="true"] .nav-links {
        max-height: 480px;
        opacity: 1;
        margin-top: 14px;
    }
    .nav[data-open="true"] .nav-cta {
        max-height: 60px;
        opacity: 1;
        padding: 11px 18px;
        margin-top: 10px;
    }
    .nav-links > li {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid var(--rule);
    }
    .nav-links > li:last-child { border-bottom: 0; }
    .nav-links a {
        font-size: 16px;
        opacity: 1;
        display: block;
    }
    /* Overflow "···" — inline "Internal" section at the bottom of the panel */
    .nav-overflow {
        order: 5;
        flex-basis: 100%;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 240ms ease, opacity 200ms ease, margin 200ms ease;
        margin: 0;
    }
    .nav[data-open="true"] .nav-overflow {
        max-height: 200px;
        opacity: 1;
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px dashed var(--rule);
    }
    .nav-overflow__btn { display: none; }
    .nav-overflow__menu {
        position: static;
        background: none;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        min-width: 0;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }
    .nav-overflow__eyebrow {
        margin: 0 0 6px;
        opacity: 0.6;
    }
    .nav-overflow__menu a {
        padding: 8px 0;
        font-size: 14px;
        color: var(--mid);
    }
    .nav-overflow__menu a + a { border-top: 1px dashed var(--rule); }
    .nav[data-open="true"] {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-bottom-color: var(--rule);
    }
}

/* === PAGE HEADER — Thinking index page hero ===
   Mirrors the `.ai-hero` pattern in ai.html and `.ed-hero-new` in
   services.html so the Services / AI Excellence / Thinking nav doesn't
   visually jump between pages. */
.page-head {
    position: relative;
    padding: clamp(140px, 16vw, 220px) var(--gutter) clamp(96px, 12vw, 144px);
    background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
    text-align: center;
    overflow: hidden;
}
.page-head__eyebrow {
    font-family: var(--body);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--lime);
    margin: 0 0 18px;
}
.page-head__title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(44px, 6vw, 88px);
    line-height: 1.0;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0 auto 32px;
    max-width: 16ch;
}
.page-head__sub {
    font-family: var(--body);
    font-size: clamp(17px, 1.6vw, 21px);
    line-height: 1.5;
    color: var(--mid);
    max-width: 56ch;
    margin: 0 auto;
}

/* === FILTER ROW (index) === */
.filters {
    max-width: var(--ed-max);
    margin: 0 auto var(--ed-space-4);
    padding: 0 var(--gutter);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.filter {
    appearance: none;
    padding: 8px 16px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-family: var(--body);
    font-size: 13px;
    color: var(--ink);
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.filter:hover { background: var(--paper-2); }
.filter:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}
.filter[aria-pressed="true"] {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* === POST GRID === */
.posts {
    max-width: var(--ed-max);
    margin: 0 auto;
    padding: 0 var(--gutter) var(--ed-space-6);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--ed-space-4);
}
.post-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--ink);
    padding: var(--ed-space-3);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 6px;
    transition: background 150ms ease, border-color 150ms ease;
}
.post-card:hover {
    background: var(--paper-2);
    border-color: var(--ink);
}
.post-card__tag {
    display: inline-block;
    align-self: flex-start;
    font-family: var(--body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mid);
    border: 1px solid var(--rule);
    padding: 4px 10px;
    margin-bottom: var(--ed-space-3);
    border-radius: 999px;
}
.post-card__title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0 0 var(--ed-space-2);
}
.post-card__desc {
    font-family: var(--body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--mid);
    margin: 0 0 var(--ed-space-3);
    flex: 1;
}
.post-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--body);
    font-size: 12px;
    color: var(--mid);
    margin-top: auto;
}
.post-card__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.post-card[hidden] { display: none; }

@media (max-width: 880px) {
    .posts { grid-template-columns: 1fr; }
}

/* === POST — single article reading column === */
.post {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--ed-space-4) var(--gutter) var(--ed-space-5);
}
.post__head { margin-bottom: var(--ed-space-3); }
.post__tag {
    display: inline-block;
    font-family: var(--body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mid);
    border: 1px solid var(--rule);
    padding: 4px 10px;
    margin: 0 0 var(--ed-space-3);
    border-radius: 999px;
}
.post__title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0 0 var(--ed-space-3);
}
.post__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--body);
    font-size: 13px;
    color: var(--mid);
    margin: 0;
    flex-wrap: wrap;
}
.post__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.post__author { color: var(--ink); font-weight: 500; }
.post__sep { color: var(--rule); }

.post__share {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--ed-space-2) 0;
    margin: var(--ed-space-3) 0 var(--ed-space-4);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    font-family: var(--body);
    font-size: 13px;
    flex-wrap: wrap;
}
.post__share-label {
    color: var(--mid);
    font-weight: 500;
    margin-right: 8px;
}
.post__share button,
.post__share a {
    appearance: none;
    background: transparent;
    border: 0;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 150ms ease;
}
.post__share button:hover,
.post__share a:hover { background: var(--paper-2); }
.post__share button:focus-visible,
.post__share a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.post__body {
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
}
.post__body h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin: var(--ed-space-4) 0 var(--ed-space-2);
}
.post__body p { margin: 0 0 var(--ed-space-3); }

.post__tags {
    margin-top: var(--ed-space-4);
    padding-top: var(--ed-space-3);
    border-top: 1px solid var(--rule);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.post__tag-item {
    font-family: var(--body);
    font-size: 12px;
    font-weight: 500;
    color: var(--mid);
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: 4px 10px;
}

/* === RELATED === */
.related {
    max-width: var(--ed-max);
    margin: 0 auto;
    padding: var(--ed-space-5) var(--gutter);
    border-top: 1px solid var(--rule);
}
.related__label {
    font-family: var(--body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mid);
    margin: 0 0 var(--ed-space-3);
    text-align: center;
}
.related__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--ed-space-3);
    max-width: 880px;
    margin: 0 auto;
}
.related__empty {
    text-align: center;
    color: var(--mid);
    font-size: 14px;
    margin: 0;
}
@media (max-width: 720px) {
    .related__grid { grid-template-columns: 1fr; }
}

/* === BOTTOM CTA === */
.post-cta {
    text-align: center;
    padding: var(--ed-space-5) var(--gutter);
    border-top: 1px solid var(--rule);
}
.post-cta a {
    font-family: var(--body);
    font-size: 17px;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 1px;
    transition: opacity 150ms ease;
}
.post-cta a:hover { opacity: 0.7; }

/* === FOOTER === */
.footer {
    background: var(--paper-2);
    padding: var(--ed-space-3) var(--gutter);
    border-top: 1px solid var(--rule);
}
.footer__inner {
    max-width: var(--ed-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ed-space-3);
    flex-wrap: wrap;
    font-family: var(--body);
    font-size: 12px;
    color: var(--mid);
}
.footer em {
    font-style: italic;
    color: var(--ink);
    font-weight: 500;
}
.footer__social {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.footer__social a {
    display: inline-flex;
    color: inherit;
    opacity: 0.5;
    transition: opacity 150ms ease;
}
.footer__social a:hover { opacity: 1; }
.footer__social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
