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

:root {
    --blue-light: #64d0f4;
    --blue-dark: #293a5f;
    --navy: #111827;
    --text: #F3F4F6;
    --text-body: #E5E7EB;
    --text-muted: #9CA3AF;
    --card-bg: rgba(17, 24, 39, 0.88);
    --max-width: 1100px;
    --read-width: 760px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-image: linear-gradient(to bottom, #64d0f4 0%, #293a5f 40%, #111827 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Inter', 'Avenir', sans-serif;
    font-weight: 400;
    min-height: 100vh;
    line-height: 1.7;
}

a {
    color: var(--blue-light);
    text-underline-offset: 2px;
}

/* NAV */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.9rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(100, 208, 244, 0.1);
}

nav img {
    height: 34px;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.18s;
}

.nav-link:hover {
    color: var(--blue-light);
}

a.cta {
    display: inline-block;
    color: var(--blue-light);
    text-decoration: none;
    border: 1px solid var(--blue-light);
    padding: 0.4rem 1.1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.18s, color 0.18s;
}

a.cta:hover {
    background: var(--blue-light);
    color: var(--navy);
}

/* PAGE LAYOUT */
.wrap {
    max-width: var(--read-width);
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

.crumbs {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.crumbs a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}

.crumbs a:hover {
    text-decoration: underline;
}

/* LISTING PAGE */
.page-title {
    font-family: 'Quicksand', 'Avenir', sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 6vw, 3rem);
    letter-spacing: 0.05em;
    color: var(--navy);
    margin-top: 1rem;
}

.page-intro {
    color: var(--navy);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.post-card {
    display: block;
    background: var(--card-bg);
    border-left: 3px solid var(--blue-light);
    border-radius: 6px;
    padding: 1.75rem 2rem;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.18s, box-shadow 0.18s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.post-card h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--blue-light);
    margin: 0.3rem 0 0.6rem;
    line-height: 1.3;
}

.post-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.post-card .post-meta {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--blue-light);
    font-size: 0.9rem;
    font-weight: 600;
}

/* TOOL LOGOS (decorative) */
.tool-wordmarks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin: 1.4rem 0 0;
    opacity: 0.88;
}

.tool-wordmarks img {
    display: block;
    width: auto;
}

.tool-wordmarks .icon-mark {
    height: 22px;
}

/* Override .prose img's photo-card styling (white background, border-radius,
   auto margin) -- several logos are transparent white silhouettes that need
   to sit directly on the page background, not inside a white card. */
.prose .tool-wordmarks img.icon-mark {
    background: none;
    border-radius: 0;
    margin: 0;
    max-width: none;
    height: 22px;
}

/* ARTICLE */
.article-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 2.75rem 2.75rem 2.5rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.article-header h1 {
    font-family: 'Quicksand', 'Avenir', sans-serif;
    font-weight: 300;
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--blue-light);
    margin-bottom: 0.75rem;
}

.dek {
    font-size: 1.15rem;
    color: var(--text);
    opacity: 0.9;
    margin-bottom: 0.9rem;
}

.byline {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(100, 208, 244, 0.15);
}

/* TABLE OF CONTENTS */
.toc {
    margin: 1.5rem 0 0.5rem;
    background: rgba(100, 208, 244, 0.06);
    border: 1px solid rgba(100, 208, 244, 0.18);
    border-radius: 6px;
    padding: 0.9rem 1.25rem;
}

.toc summary {
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue-light);
}

.toc ol {
    margin: 0.75rem 0 0.25rem 1.25rem;
    font-size: 0.92rem;
    columns: 2;
    column-gap: 2rem;
}

.toc li {
    margin: 0.15rem 0;
    break-inside: avoid;
}

.toc a {
    text-decoration: none;
    color: var(--text-body);
}

.toc a:hover {
    color: var(--blue-light);
}

/* PROSE */
.prose {
    color: var(--text-body);
    font-size: 1.04rem;
}

.prose > * + * {
    margin-top: 1.05rem;
}

.prose h2 {
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--blue-light);
    margin-top: 3rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(100, 208, 244, 0.15);
    scroll-margin-top: 5rem;
}

.prose h3 {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--blue-light);
    margin-top: 2rem;
    scroll-margin-top: 5rem;
}

.prose strong {
    font-weight: 600;
    color: #fff;
}

.prose ul,
.prose ol {
    padding-left: 1.4rem;
}

.prose li + li {
    margin-top: 0.4rem;
}

.prose li > ul,
.prose li > ol {
    margin-top: 0.4rem;
}

.prose li::marker {
    color: var(--blue-light);
}

.prose code {
    background: rgba(255, 255, 255, 0.09);
    padding: 0.1em 0.38em;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.prose blockquote {
    border-left: 3px solid var(--blue-light);
    padding: 0.4rem 0 0.4rem 1.25rem;
    font-size: 1.1rem;
    color: var(--text);
}

.prose blockquote strong {
    color: var(--blue-light);
}

.prose .takeaway {
    background: rgba(100, 208, 244, 0.08);
    border-left: 3px solid var(--blue-light);
    border-radius: 0 6px 6px 0;
    padding: 0.8rem 1.1rem;
    color: var(--text);
}

.prose .takeaway strong {
    color: var(--blue-light);
}

/* Images and captions */
.prose img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0.5rem auto 0;
    border-radius: 6px;
    background: #fff;
}

.prose p:has(> img) + p:has(> em:only-child) {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.prose table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.92rem;
    line-height: 1.5;
}

.prose th,
.prose td {
    text-align: left;
    vertical-align: top;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(100, 208, 244, 0.15);
}

.prose th {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--blue-light);
    border-bottom: 1px solid rgba(100, 208, 244, 0.4);
    white-space: nowrap;
}

/* ~~strikethrough~~ in a table cell is repurposed as a "covered only briefly
   elsewhere" marker: no literal strikethrough, just dimmed and softened. */
.prose table del {
    text-decoration: none;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.7;
}

/* Checklists */
.prose ul.task-list {
    list-style: none;
    padding-left: 0;
}

.prose .task-list label {
    display: block;
    cursor: pointer;
    padding-left: 1.65rem;
    text-indent: -1.65rem;
}

.prose input[type="checkbox"] {
    accent-color: var(--blue-light);
    margin-right: 0.55rem;
    transform: translateY(1px);
}

/* Closing call to action */
.cta-card {
    margin-top: 3rem;
    padding: 1.5rem 1.75rem;
    border-radius: 6px;
    border: 1px solid rgba(100, 208, 244, 0.25);
    background: rgba(100, 208, 244, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.cta-card p {
    flex: 1 1 280px;
    color: var(--text);
}

/* FOOTER */
footer {
    background: rgba(10, 15, 28, 0.95);
    padding: 2rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.8;
}

footer strong {
    color: var(--text);
}

/* RESPONSIVE */
@media (max-width: 640px) {
    nav { padding: 0.9rem 1.25rem; }
    .nav-links { gap: 1rem; }
    .wrap { padding: 1.5rem 0.75rem 3rem; }
    .article-card { padding: 1.75rem 1.25rem; }
    .toc ol { columns: 1; }
    .post-card { padding: 1.4rem 1.25rem; }
    .prose { font-size: 1rem; }
}
