/* ==========================================================================
   Hasan YILMAZ — portfolio
   Mobile-first. Breakpoints: 600px (tablet), 900px (desktop), 1600px (wide)
   ========================================================================== */

:root {
    /* Brand palette carried over from the original site */
    --c1: #e36975;
    --c2: #eaa751;
    --c3: #9caa6c;
    --c4: #ebc447;
    --c5: #67b0b1;

    --bg: #10181d;
    --bg-alt: #141f25;
    --surface: #18252c;
    --surface-2: #1f2e36;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #e9eef0;
    --muted: #9db0ba;
    --accent: var(--c5);

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --gutter: clamp(16px, 4vw, 40px);
    --max: 1180px;
    --radius: 14px;
    --radius-sm: 10px;
    --header-h: 64px;
    --section-y: clamp(56px, 9vw, 112px);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);

    color-scheme: dark;
}

@media (min-width: 1600px) {
    :root { --max: 1320px; }
}
@media (min-width: 2200px) {
    :root { --max: 1480px; }
    body { font-size: 18px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: clamp(15px, 0.25vw + 14px, 17px);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; }
::selection { background: #53636c; }

:focus-visible { outline: 2px solid var(--c4); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.container.narrow { --max: 720px; }
.muted { color: var(--muted); }

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 100;
    background: var(--c4); color: #111; padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
    min-height: 44px; padding: 0 1.2em;
    border-radius: 999px; border: 1px solid var(--border-strong);
    font: 600 0.95rem/1 var(--font); color: var(--text); background: transparent;
    cursor: pointer; white-space: nowrap;
    transition: background-color .2s, border-color .2s, transform .2s, color .2s;
}
.btn:hover { border-color: var(--text); transform: translateY(-1px); }
.btn-primary { background: var(--c5); border-color: var(--c5); color: #0d1418; }
.btn-primary:hover { background: #7cc4c5; border-color: #7cc4c5; }
.btn-ghost { background: rgba(255, 255, 255, 0.03); }
.btn-icon { width: 44px; padding: 0; }
.btn-sm { min-height: 36px; padding: 0 0.9em; font-size: 0.85rem; }
.btn-sm.btn-icon { width: 36px; padding: 0; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(16, 24, 29, 0.82);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }

.logo { display: inline-flex; font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -0.04em; flex-shrink: 0; }
.logo span:first-child { color: var(--c1); }
.logo .logo-flip { color: var(--c2); transform: scale(-1, -1); }

.nav {
    display: flex; gap: 2px; margin-left: auto;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
    position: relative; padding: 10px 12px; border-radius: 8px;
    color: var(--muted); font-weight: 500; font-size: 0.95rem; white-space: nowrap;
    transition: color .2s, background-color .2s;
}
.nav a::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px;
    background: var(--nav-color, var(--c5)); transform: scaleX(0); transition: transform .25s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav a.active, .nav a[aria-current="page"] { color: var(--text); }
.nav a.active::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[data-color="1"] { --nav-color: var(--c1); }
.nav a[data-color="2"] { --nav-color: var(--c2); }
.nav a[data-color="3"] { --nav-color: var(--c3); }
.nav a[data-color="4"] { --nav-color: var(--c4); }
.nav a[data-color="5"] { --nav-color: var(--c5); }

.header-cta { flex-shrink: 0; }

.stripe {
    height: 3px;
    background: linear-gradient(90deg, var(--c1) 0 20%, var(--c2) 20% 40%, var(--c3) 40% 60%, var(--c4) 60% 80%, var(--c5) 80% 100%);
}

/* Small screens: logo + CTA on top, nav scrolls horizontally underneath */
@media (max-width: 759px) {
    :root { --header-h: 104px; }
    .header-inner { flex-wrap: wrap; row-gap: 0; padding-top: 8px; }
    .header-cta { margin-left: auto; }
    .nav {
        order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter));
        padding: 0 var(--gutter) 4px;
        mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
    }
}

/* ---------- Hero ---------- */
.hero {
    padding: clamp(32px, 7vw, 96px) 0 clamp(8px, 2vw, 24px);
    background:
        radial-gradient(60rem 30rem at 85% -10%, rgba(103, 176, 177, 0.14), transparent 60%),
        radial-gradient(40rem 24rem at -10% 20%, rgba(227, 105, 117, 0.10), transparent 60%);
}
.hero-grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 999px;
    font-size: 0.85rem; color: var(--muted); margin-bottom: 20px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c3); box-shadow: 0 0 0 4px rgba(156, 170, 108, 0.2); }

.hero h1 { font-size: clamp(2.6rem, 7vw + 0.5rem, 5.2rem); font-weight: 800; letter-spacing: -0.04em; }
.hero-role {
    margin-top: 8px; font-size: clamp(1.15rem, 1.5vw + 0.8rem, 1.6rem); font-weight: 600;
    background: linear-gradient(90deg, var(--c1), var(--c2) 50%, var(--c4));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin-top: 18px; max-width: 56ch; color: var(--muted); font-size: clamp(1rem, 0.4vw + 0.95rem, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.hero-photo { margin: 0; position: relative; justify-self: center; width: min(100%, 420px); }
.hero-photo picture {
    display: block; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 5;
    box-shadow: var(--shadow), 0 0 0 1px var(--border);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.hero-photo::before {
    content: ""; position: absolute; inset: 16px -16px -16px 16px; z-index: -1; border-radius: 24px;
    background: linear-gradient(135deg, var(--c1), var(--c2), var(--c4), var(--c5));
    opacity: 0.55;
}
.hero-photo figcaption {
    position: absolute; left: 14px; bottom: 14px;
    padding: 6px 12px; border-radius: 999px; font-size: 0.85rem;
    background: rgba(16, 24, 29, 0.8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-photo figcaption i { color: var(--c1); margin-right: 4px; }

@media (max-width: 599px) {
    .hero-photo { width: min(100%, 320px); }
    .hero-photo::before { inset: 10px -10px -10px 10px; }
    .hero-actions .btn:not(.btn-icon) { flex: 1 1 auto; }
}

@media (min-width: 900px) {
    .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); }
    .hero-photo { justify-self: end; }
}

.stats {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
    margin-top: clamp(36px, 6vw, 72px);
}
.stats li {
    padding: 18px; border-radius: var(--radius); background: var(--surface);
    border: 1px solid var(--border); border-top: 3px solid var(--accent);
}
.stats strong { display: block; font-size: clamp(1.1rem, 1vw + 0.9rem, 1.5rem); font-weight: 800; }
.stats span { color: var(--muted); font-size: 0.875rem; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.page-top { padding-top: clamp(32px, 6vw, 72px); }

.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h1, .section-head h2 { font-size: clamp(1.8rem, 3vw + 0.8rem, 2.8rem); font-weight: 800; }
.section-lead { margin-top: 14px; max-width: 64ch; color: var(--muted); font-size: 1.05rem; }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }

.kicker {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px;
    font: 600 0.8rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent);
}
.kicker span { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--accent); color: #0d1418; }

/* ---------- Cards (shared) ---------- */
.skill-card, .work-card, .doc-card, .bars-card, .post-card, .contact-form, .services li, .list-cards a {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li, .tags a {
    font-size: 0.8rem; padding: 3px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--muted);
}
.tags a:hover { color: var(--text); border-color: var(--border-strong); }

/* About skills */
.skill-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
@media (min-width: 900px) { .skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.skill-card {
    display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 14px;
    padding: 18px 20px; position: relative; overflow: hidden; transition: border-color .2s, transform .2s;
}
.skill-card .tags { grid-column: 1 / -1; }
.skill-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.skill-card > i {
    display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-size: 1.1rem;
    color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.skill-card h3 { font-size: 1.1rem; margin: 0; }
.skill-card .tags { margin-top: 14px; }

/* Resume */
.resume-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .resume-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; } }

.docs { display: grid; gap: 12px; }
.doc-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.doc-card > i { font-size: 1.5rem; color: var(--c2); width: 28px; text-align: center; flex-shrink: 0; }
.doc-card > div:first-of-type { flex: 1; min-width: 0; }
.doc-card h3 { font-size: 1rem; }
.doc-card p { color: var(--muted); font-size: 0.875rem; }
.doc-actions { display: flex; gap: 8px; flex-shrink: 0; }

.bars-card { padding: 24px; }
.bars-card h3 { font-size: 1.1rem; margin-bottom: 18px; }
.bars { display: grid; gap: 18px; }
.bars li { display: grid; grid-template-columns: 1fr auto; row-gap: 8px; font-weight: 600; font-size: 0.95rem; }
.bar-value { font-family: var(--mono); color: var(--muted); font-size: 0.85rem; }
.bar { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > span {
    display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent);
    transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}
.bars.in-view .bar > span, html:not(.js) .bar > span { width: var(--value); }
.shrug { margin-top: 18px; font-family: var(--mono); }

/* Certificates (Credly iframes are fixed 150×270) */
.cert-grid { display: flex; flex-wrap: wrap; gap: 16px; }
@media (max-width: 599px) { .cert-grid { justify-content: center; } }
.cert-card {
    position: relative; display: flex; flex-direction: column; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    transition: border-color .2s, transform .2s;
}
.cert-card:hover { border-color: var(--c5); transform: translateY(-2px); }
.cert-card iframe { display: block; width: 150px; height: 270px; border: 0; border-radius: var(--radius-sm); background: #fff; }
.cert-badge { display: block; width: 150px; height: 270px; border-radius: var(--radius-sm); object-fit: contain; background: #fff; }
div.cert-badge {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px;
    background: var(--surface-2); color: var(--c5); text-align: center;
}
div.cert-badge i { font-size: 3.5rem; }
div.cert-badge span { color: var(--muted); font: 600 0.75rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
div.cert-badge-kaggle { color: #20beff; }
div.cert-badge-linkedin { color: #0a66c2; }
.cert-name { max-width: 150px; margin-top: 10px; font-size: 0.9rem; line-height: 1.3; }
.cert-open {
    padding: 8px 0 0; border: 0; background: none; font-family: inherit; color: var(--c5); cursor: pointer; text-align: left;
}
.cert-card:hover .cert-open i { transform: translateX(3px); }

.cert-popover {
    width: min(100% - 32px, 520px); max-height: min(100% - 32px, 640px); overflow: auto;
    padding: 28px; border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.cert-popover::backdrop { background: rgba(0, 0, 0, 0.6); }
.cert-popover h3 { font-size: 1.3rem; padding-right: 44px; }
.cert-close { position: absolute; top: 16px; right: 16px; }
.cert-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: var(--muted); font-size: 0.9rem; }
.cert-meta i { color: var(--c5); margin-right: 4px; }
.cert-desc { margin-top: 18px; line-height: 1.6; white-space: pre-line; }
.cert-url { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.875rem; overflow-wrap: anywhere; }
.cert-url span { display: block; margin-bottom: 4px; color: var(--muted); font: 600 0.7rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.cert-url a { color: var(--c5); text-decoration: underline; text-underline-offset: 3px; }

/* Works */
.filters {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%;
    padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
}
.filters::-webkit-scrollbar { display: none; }
.filters button {
    flex-shrink: 0; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
    background: transparent; color: var(--muted); font: 500 0.875rem var(--font); cursor: pointer;
    transition: background-color .2s, color .2s;
}
.filters button:hover { color: var(--text); }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
@media (max-width: 599px) {
    .filters { border-radius: 12px; width: 100%; }
}

.work-grid, .post-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
@media (min-width: 1200px) { .work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.work-card, .post-card {
    position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px;
    transition: border-color .2s, transform .2s, opacity .3s;
}
.work-card { border-top: 3px solid var(--accent); }
.work-card:hover, .post-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.work-card.is-hidden, .post-card.is-hidden { display: none; }
.work-top { display: flex; align-items: center; gap: 8px; color: var(--accent); font: 600 0.75rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.work-top i { font-size: 1.1rem; }
.work-card h3, .post-card h3 { font-size: 1.15rem; }
.work-card p, .post-card p { color: var(--muted); font-size: 0.925rem; }
.work-link { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; color: var(--accent); }
.work-link i { font-size: 0.8em; transition: transform .2s; }
.work-card:hover .work-link i, .post-card:hover .work-link i { transform: translateX(3px); }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

.work-card details { position: relative; z-index: 1; font-size: 0.875rem; color: var(--muted); }
.work-card summary { cursor: pointer; color: var(--text); font-weight: 500; }
.work-card details p { margin-top: 8px; font-size: 0.85rem; }

/* Projects & services */
.two-col { display: grid; gap: 36px; }
@media (min-width: 900px) { .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; } }
.col-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 16px; font-weight: 600; }

.list-cards { display: grid; gap: 12px; }
.list-cards a { display: flex; align-items: center; gap: 16px; padding: 16px 18px; transition: border-color .2s, transform .2s; }
.list-cards a:hover { border-color: var(--accent); transform: translateX(3px); }
.list-cards a > span:nth-child(2) { flex: 1; min-width: 0; }
.list-cards strong { display: block; }
.list-cards a > span:nth-child(2) > span { color: var(--muted); font-size: 0.9rem; }
.list-cards a > i { color: var(--muted); font-size: 0.85rem; }
.badge {
    display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px;
    background: var(--accent); color: #0d1418; font: 800 0.95rem var(--font);
}

.services { display: grid; gap: 12px; }
.services li { display: flex; gap: 16px; padding: 18px; border-left: 3px solid var(--accent); }
.services i { color: var(--accent); font-size: 1.2rem; margin-top: 3px; width: 22px; text-align: center; }
.services p { color: var(--muted); font-size: 0.9rem; }
.note { margin-top: 16px; color: var(--muted); font-size: 0.9rem; }
.note i { color: var(--c4); margin-right: 6px; }

/* Contact */
.contact-grid { display: grid; gap: 36px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: start; } }

.contact-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.contact-list a {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--border); transition: border-color .2s;
    min-width: 0;
}
.contact-list a:hover { border-color: var(--c5); }
.contact-list i { font-size: 1.3rem; color: var(--c5); width: 24px; text-align: center; flex-shrink: 0; }
.contact-list span { min-width: 0; font-size: 0.875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.contact-list strong { display: block; color: var(--text); font-size: 0.95rem; }

.contact-form { display: grid; gap: 16px; padding: clamp(20px, 3vw, 32px); }
.field-row { display: grid; gap: 16px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.contact-form label { display: grid; gap: 6px; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--bg); color: var(--text); border: 1px solid var(--border-strong);
    font: 400 1rem var(--font); /* 16px+ prevents iOS zoom on focus */
    transition: border-color .2s, box-shadow .2s;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--c5); box-shadow: 0 0 0 3px rgba(103, 176, 177, 0.25); }
.contact-form [aria-invalid="true"] { border-color: var(--c1); }
.contact-form .btn { justify-self: start; }
@media (max-width: 599px) { .contact-form .btn { justify-self: stretch; } }
.form-note:empty { display: none; }
.form-note { font-size: 0.9rem; color: var(--c4); }

/* ---------- Blog ---------- */
.post-meta { color: var(--muted); font-size: 0.85rem; font-family: var(--mono); }
.post-card { border-top: 3px solid var(--c5); }
.feed-link { margin-top: 32px; font-size: 0.9rem; }
.feed-link a { color: var(--c2); }
.feed-link a:hover { text-decoration: underline; }

.post { padding: clamp(32px, 6vw, 72px) 0 var(--section-y); }
.back-link { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }
.back-link:hover { color: var(--text); }
.post-header h1 { font-size: clamp(2rem, 4vw + 0.8rem, 3.2rem); font-weight: 800; margin-top: 14px; }
.post-lead { margin-top: 14px; color: var(--muted); font-size: 1.15rem; }
.post-header .post-meta { margin-top: 18px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.post-cover { margin-top: 32px; }
.post-cover img { border-radius: var(--radius); width: 100%; }

.prose { margin-top: 32px; font-size: 1.075rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.6rem; margin-top: 2em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.6em; }
.prose a { color: var(--c5); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--c2); }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--c4); color: var(--muted); font-style: italic; }
.prose img { border-radius: var(--radius-sm); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.prose pre {
    padding: 18px 20px; border-radius: var(--radius-sm); overflow-x: auto;
    background: #0b1115; border: 1px solid var(--border); font-size: 0.875rem; line-height: 1.6;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose :not(pre) > code { color: var(--c2); }

/* Rouge syntax highlighting (compact dark palette) */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs { color: #6b7f89; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kt { color: var(--c1); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sx { color: var(--c3); }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh { color: var(--c2); }
.highlight .nf, .highlight .nc, .highlight .nb { color: var(--c5); }
.highlight .nt, .highlight .na { color: var(--c4); }
.highlight .o, .highlight .p { color: #b8c6cd; }
.highlight .gh, .highlight .gu { color: var(--c4); font-weight: 700; }

.post-footer { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); display: grid; gap: 28px; }
.share { display: flex; align-items: center; gap: 8px; }
.share .muted { margin-right: 6px; font-size: 0.9rem; }
.post-nav { display: grid; gap: 12px; }
@media (min-width: 600px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a { display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-weight: 600; }
.post-nav a:hover { border-color: var(--c5); }
.post-nav .next { text-align: right; }
.post-nav .muted { font-size: 0.8rem; font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.socials { display: flex; flex-wrap: wrap; gap: 6px; }
.socials a {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
    color: var(--muted); font-size: 1.1rem; transition: color .2s, background-color .2s;
}
.socials a:hover { color: var(--text); background: var(--surface-2); }
.socials .text-icon { font: 800 0.8rem var(--font); }
.site-footer .muted { font-size: 0.875rem; }
@media (max-width: 599px) {
    .footer-inner { flex-direction: column; text-align: center; }
    .socials { justify-content: center; }
}

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
}
