:root {
    --bg: #0b0c0f;
    --bg-soft: #0f1117;
    --text: #e5e7eb;
    --muted: #a1a1aa;
    --card: #0f1220;
    --card-2: #0d101a;
    --accent-1: #0ea5e9;
    --accent-2: #8b5cf6;
    --accent-3: #14b8a6;
    --ring: rgba(14, 165, 233, 0.4);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --radius: 18px;
    --maxw: 1150px;
    --pad: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
        Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background: radial-gradient(1200px 800px at 80% -10%,
            rgba(20, 184, 166, 0.15),
            transparent 50%),
        radial-gradient(900px 700px at 0% 10%,
            rgba(139, 92, 246, 0.15),
            transparent 50%),
        var(--bg);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: linear-gradient(to bottom,
            rgba(11, 12, 15, 0.85),
            rgba(11, 12, 15, 0.6));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 14px var(--pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    display: grid;
    place-items: center;
    font-weight: 800;
    box-shadow: var(--shadow);
}

.logo span {
    font-size: 18px;
}

.brand .name {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.links {
    display: flex;
    gap: 22px;
    align-items: center;
}

.links a {
    opacity: 0.9;
}

.links a.active {
    color: #fff;
    opacity: 1;
}

.menu-btn {
    display: none;
}

section {
    padding: 72px var(--pad);
}

.container {
    max-width: var(--maxw);
    margin: 0 auto;
}

.hero {
    padding-top: 110px;
    padding-bottom: 110px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
}

.hero-art.escher {
    background:
        url("../assets/hero-escher.png") center/cover no-repeat,
        var(--card);
}


.kicker {
    font-size: 14px;
    letter-spacing: 0.3px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kicker .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    display: inline-block;
}

h1.title {
    font-size: clamp(38px, 7vw, 64px);
    line-height: 1.05;
    margin: 10px 0 14px;
    font-weight: 900;
}

.gradient {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    font-size: clamp(18px, 2.8vw, 22px);
    color: #c9cad1;
    max-width: 50ch;
}

.hero-cta {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #11141f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e8e9ef;
    transition: transform 0.15s ease, box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
}

.btn.primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border: none;
}

.hero-art {
    position: relative;
    min-height: 340px;
    border-radius: var(--radius);
    background: radial-gradient(500px 300px at 60% 30%,
            rgba(14, 165, 233, 0.18),
            transparent 40%),
        radial-gradient(400px 260px at 20% 90%,
            rgba(139, 92, 246, 0.2),
            transparent 40%),
        var(--card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 18px;
}

.section-sub {
    color: var(--muted);
    margin-bottom: 26px;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.badge {
    padding: 10px 12px;
    border-radius: 999px;
    background: var(--card-2);
    border: 1px solid rgba(255, 255, 255, .06);
    font-size: 14px;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.badge:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .18);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}


.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    position: relative;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.02),
            transparent 20%),
        var(--card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius);
    padding: 18px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
}

.card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.card p {
    color: #c9cad1;
    margin: 0 0 12px;
}

.card .meta {
    color: var(--muted);
    font-size: 13px;
}

.card .thumb {
    height: 160px;
    border-radius: 12px;
    background: linear-gradient(135deg,
            rgba(14, 165, 233, 0.25),
            rgba(139, 92, 246, 0.25)),
        radial-gradient(600px 280px at 10% 0%,
            rgba(255, 255, 255, 0.08),
            transparent 40%),
        #0d1020;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}

.list {
    display: grid;
    gap: 12px;
}

.links-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.icon-link {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #11141f;
    border: 1px solid rgba(255, 255, 255, .08);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.icon-link:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .18);
    box-shadow: var(--shadow);
}

.icon-link::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    background: currentColor;
}

.icon-link.gh {
    color: #e5e7eb;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M12 2C6.48 2 2 6.58 2 12.26c0 4.5 2.87 8.31 6.84 9.66.5.1.68-.22.68-.49 0-.24-.01-.87-.01-1.71-2.78.62-3.37-1.2-3.37-1.2-.45-1.17-1.11-1.48-1.11-1.48-.91-.63.07-.62.07-.62 1 .07 1.52 1.06 1.52 1.06.9 1.57 2.36 1.12 2.94.85.09-.67.35-1.12.63-1.37-2.22-.26-4.56-1.14-4.56-5.09 0-1.12.39-2.03 1.03-2.75-.1-.26-.45-1.31.1-2.73 0 0 .85-.28 2.78 1.05a9.2 9.2 0 0 1 5.06 0c1.93-1.33 2.78-1.05 2.78-1.05.55 1.42.2 2.47.1 2.73.64.72 1.03 1.63 1.03 2.75 0 3.96-2.34 4.82-4.57 5.08.36.32.68.95.68 1.92 0 1.39-.01 2.51-.01 2.85 0 .27.18.6.69.49A10.07 10.07 0 0 0 22 12.26C22 6.58 17.52 2 12 2Z"/></svg>') center/18px no-repeat;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22><path fill=%22%23000%22 d=%22M12 2C6.48 2 2 6.58 2 12.26c0 4.5 2.87 8.31 6.84 9.66.5.1.68-.22.68-.49 0-.24-.01-.87-.01-1.71-2.78.62-3.37-1.2-3.37-1.2-.45-1.17-1.11-1.48-1.11-1.48-.91-.63.07-.62.07-.62 1 .07 1.52 1.06 1.52 1.06.9 1.57 2.36 1.12 2.94.85.09-.67.35-1.12.63-1.37-2.22-.26-4.56-1.14-4.56-5.09 0-1.12.39-2.03 1.03-2.75-.1-.26-.45-1.31.1-2.73 0 0 .85-.28 2.78 1.05a9.2 9.2 0 0 1 5.06 0c1.93-1.33 2.78-1.05 2.78-1.05.55 1.42.2 2.47.1 2.73.64.72 1.03 1.63 1.03 2.75 0 3.96-2.34 4.82-4.57 5.08.36.32.68.95.68 1.92 0 1.39-.01 2.51-.01 2.85 0 .27.18.6.69.49A10.07 10.07 0 0 0 22 12.26C22 6.58 17.52 2 12 2Z%22/></svg>') center/18px no-repeat;
    background: #e5e7eb;
}

.icon-link.live {
    color: #0ea5e9;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M10.9 2.1c.7-.4 1.6-.4 2.3 0l7.2 4.2c.7.4 1.1 1.2 1.1 2.1v8.3c0 .9-.4 1.6-1.1 2.1l-7.2 4.2c-.7.4-1.6.4-2.3 0l-7.2-4.2C2.9 18.3 2.5 17.5 2.5 16.6V8.3c0-.9.4-1.6 1.1-2.1l7.3-4.1zM10 8.5v7l6-3.5-6-3.5z"/></svg>') center/18px no-repeat;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22><path fill=%22%23000%22 d=%22M10.9 2.1c.7-.4 1.6-.4 2.3 0l7.2 4.2c.7.4 1.1 1.2 1.1 2.1v8.3c0 .9-.4 1.6-1.1 2.1l-7.2 4.2c-.7.4-1.6.4-2.3 0l-7.2-4.2C2.9 18.3 2.5 17.5 2.5 16.6V8.3c0-.9.4-1.6 1.1-2.1l7.3-4.1zM10 8.5v7l6-3.5-6-3.5z%22/></svg>') center/18px no-repeat;
    background: #0ea5e9;
}

/* Bio feature card */
.title-gradient {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#about p {
    font-size: 17px;
    color: #d9dbe3;
}

@media (min-width: 900px) {
    #about p {
        font-size: 18px;
    }
}

.about-card {
    position: relative;
    padding: 28px 24px;
    border-radius: 18px;
    background:
        radial-gradient(900px 420px at 90% -10%, rgba(14, 165, 233, .12), transparent 45%),
        radial-gradient(700px 380px at -10% 110%, rgba(139, 92, 246, .12), transparent 50%),
        var(--card-2);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: var(--shadow);
}

.about-accent {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(14, 165, 233, .18), rgba(139, 92, 246, .18));
    mask: linear-gradient(#000, transparent 55%);
    opacity: .25;
}

.lead {
    font-size: 18px;
    color: #d9dbe3;
    margin-bottom: 16px
}

.about-grid {
    display: grid;
    gap: 16px
}

@media (min-width: 900px) {
    .about-card {
        padding: 32px 28px
    }

    .lead {
        font-size: 19px
    }

    .about-grid {
        grid-template-columns: 1.25fr .75fr
    }
}

.about-col p {
    margin: 0
}

.about-aside {
    display: grid;
    gap: 12px
}

.about-group {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(255, 255, 255, .06);
}

.about-h {
    font-weight: 800;
    letter-spacing: .2px;
    color: #eef;
    margin-bottom: 6px;
}


.tech-tiles {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width:1100px) {
    .tech-tiles {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width:680px) {
    .tech-tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tech-tiles li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 25%), var(--card-2);
    border: 1px solid rgba(255, 255, 255, .07);
    min-height: 72px;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.tech-tiles li:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .18);
    box-shadow: var(--shadow);
}

.tech-tiles img {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25));
}

.tech-tiles span {
    font-weight: 600;
    letter-spacing: .2px;
}

.tech-tiles li {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.tech-tiles li::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 40%);
    opacity: .7;
}

.tech-tiles li::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(160% 180% at 18% -18%,
            rgba(255, 255, 255, .95),
            rgba(255, 255, 255, .80) 35%,
            rgba(255, 255, 255, .55) 60%,
            rgba(255, 255, 255, 0) 78%),
        linear-gradient(180deg, rgba(255, 255, 255, .48), rgba(255, 255, 255, 0) 72%);
    opacity: 0;
    transition: opacity .18s ease;
}

.tech-tiles li:hover::after {
    opacity: 1;
}

.tech-tiles li:hover {
    border-color: rgba(255, 255, 255, .65);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}

.tech-tiles li>* {
    position: relative;
    z-index: 1;
}

.tech-tiles li span {
    transition: color .18s ease;
}

.tech-tiles li:hover span {
    color: #0b0c0f;
}

.tech-tiles img {
    transition: transform .18s ease, filter .18s ease;
}

.tech-tiles li:hover img {
    transform: scale(1.03);
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25));
}

.tech-tiles img.mono {
    filter: invert(1) brightness(1.05);
}

.tech-tiles li:hover img.mono {
    filter: none;
}

.learn-next {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.learn-next .label {
    color: var(--muted);
    font-size: 14px;
}

.badge.strong {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff;
    border: none;
}



.post {
    padding: 14px;
    border-radius: 12px;
    background: var(--card-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post .left {
    display: grid;
    gap: 2px;
}

.post .title {
    font-weight: 600;
}

.series {
    font-size: 12px;
    color: var(--muted);
}

.teaching {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.note {
    padding: 14px;
    border-radius: 12px;
    background: var(--card-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.contact {
    display: grid;
    gap: 12px;
    grid-template-columns: 2fr 1fr;
}

.contact .box {
    padding: 18px;
    border-radius: 14px;
    background: var(--card-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

footer {
    padding: 40px var(--pad);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

#modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease
}

#post-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 60
}

#post-modal.open,
#modal-backdrop.open {
    opacity: 1;
    pointer-events: auto
}

.modal-article {
    max-width: 900px;
    width: min(92vw, 900px);
    max-height: 85vh;
    overflow: auto;
    background: var(--card-2);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow)
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 26px;
    line-height: 1;
    background: transparent;
    border: 0;
    color: #e5e7eb;
    cursor: pointer;
    border-radius: 8px
}

body.modal-open {
    overflow: hidden
}

.embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    overflow: hidden;
    background: #0b0c0f
}

.embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0
}


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

    .contact {
        grid-template-columns: 1fr;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .links {
        display: flex !important;
    }

    .menu-btn {
        display: none !important;
    }
}

@media (max-width: 899px) {
    .links {
        display: none !important;
    }

    .menu-btn {
        display: inline-flex !important;
    }
}


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

    .teaching {
        grid-template-columns: 1fr;
    }
}

.mobile {
    position: fixed;
    inset: 60px var(--pad) auto;
    background: var(--bg-soft);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px;
    display: none;
    box-shadow: var(--shadow);
}

.mobile.open {
    display: grid;
    gap: 8px;
}

.mobile a {
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
    border-radius: 8px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.post-article {
    background: var(--card-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
}