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

        :root {
    --gh-font-heading: var(--display);
    --gh-font-body: var(--body);
            --bg: #05050A;
            --bg-card: #0A0A12;
            --bg-elevated: #10101A;
            --ink: rgba(255, 255, 255, 0.95);
            --ink-body: rgba(255, 255, 255, 0.65);
            --ink-muted: rgba(255, 255, 255, 0.4);
            --ink-dim: rgba(255, 255, 255, 0.15);
            --accent: #5E9DFF;
            --accent-soft: rgba(94, 157, 255, 0.15);
            --border: rgba(255, 255, 255, 0.08);
            --radius: 12px;
            --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
            
            --sans: 'Inter', sans-serif;
            --display: 'Space Grotesk', sans-serif;
            --mono: 'IBM Plex Mono', monospace;
        }

        html { font-size: 16px; scroll-behavior: smooth; }
        body {
            font-family: var(--sans); color: var(--ink-body);
            line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden;
            
            background-color: var(--bg);
            
        }
        a { color: inherit; text-decoration: none; }
        .container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 3rem); }

        /* ── Nav ── */
        .nav {
            position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 64px;
            background: rgba(5, 5, 10, 0.85); backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--border);
        }
        .nav__inner {
            max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 3rem);
            height: 100%; display: flex; align-items: center; justify-content: space-between;
        }
        .nav__toggle {
            display: none; background: none; border: none; cursor: pointer;
            width: 32px; height: 32px; padding: 4px; z-index: 100;
        }
        .nav__toggle-line {
            display: block; width: 100%; height: 2px; background: var(--ink);
            transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
        }
        .nav__toggle-line:first-child { margin-bottom: 6px; }

        .nav__logo { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.04em; }
        .nav__links { display: flex; align-items: center; gap: 2.5rem; }
        .nav__links a {
            font-size: 0.85rem; font-weight: 500; color: var(--ink-muted);
            transition: color 0.3s var(--ease-out);
        }
        .nav__links a:hover { color: var(--accent); }
        
        .nav-progress {
            position: absolute; bottom: -1px; left: 0; height: 2px;
            background: var(--accent); width: 0%; z-index: 101;
            transition: width 0.1s ease-out;
        }

        /* ── Content-First Hero ── */
        .hero {
            padding-top: clamp(8rem, 12vw, 10rem); padding-bottom: 4rem;
            position: relative; overflow: hidden;
        }
        .hero::before {
            content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50vh;
            background: radial-gradient(circle at 50% -20%, rgba(0, 229, 255, 0.05), transparent 70%);
            z-index: 0; pointer-events: none;
        }
        .hero__inner { position: relative; z-index: 2; }
        
        /* Intro Block */
        .hero__intro { max-width: 720px; margin-bottom: 4rem; }
        .hero__name {
            font-family: var(--display); font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 700;
            letter-spacing: -0.04em; line-height: 1.05; color: var(--ink); margin-bottom: 1.25rem;
        }
        /* TWO TONE TEXT STYLE ADDITION */
        .hero__name-accent {
            color: var(--accent);
            font-family: var(--sans);
            font-style: italic;
            font-weight: 500;
        }
        .hero__desc {
            font-size: 1.2rem; color: var(--ink-body); line-height: 1.6;
            max-width: 48ch; margin-bottom: 2rem;
        }

        /* Hero Posts Grid */
        .hero-posts {
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
            margin-top: 2rem;
        }
        .hero-card {
            display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; padding: 1.25rem;
            border-radius: var(--radius); background: var(--bg-card);
            border: 1px solid var(--border); transition: all 0.4s var(--ease-out);
            position: relative; overflow: hidden;
        }
        .hero-card:hover {
            border-color: var(--accent);
            background: var(--bg-elevated);
            box-shadow: 0 8px 30px rgba(0, 229, 255, 0.08);
            transform: translateY(-2px);
        }
        .hero-card__thumb {
            width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
            background: var(--border); position: relative;
        }
        .hero-card__thumb img {
            width: 100%; height: 100%; object-fit: cover;
            transition: transform 0.6s var(--ease-out);
        }
        /* image hover animation removed per impeccable skill */
        .hero-card__badge {
            background: var(--accent-soft); color: var(--accent);
            border: 1px solid rgba(94, 157, 255, 0.2);
            font-family: var(--mono); font-size: 0.65rem; font-weight: 600;
            padding: 0.15rem 0.4rem; border-radius: 4px;
            letter-spacing: 0.05em; text-transform: uppercase;
            display: inline-block; margin-right: 0.5rem;
        }
        .hero-card__meta {
            display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; width: 100%;
            font-family: var(--mono); font-size: 0.75rem; color: var(--ink-muted);
            margin-bottom: 0.75rem;
        }
        .hero-card__cat { color: var(--accent); }
        .hero-card__title {
            font-family: var(--display); font-size: 1.15rem; font-weight: 600; 
            color: var(--ink); line-height: 1.35; letter-spacing: -0.01em; margin-bottom: 0.5rem;
        }

        /* ── Bento Topics ── */
        .topics { padding-top: clamp(5rem, 10vw, 8rem); padding-bottom: clamp(5rem, 10vw, 8rem); }
        .section-title {
            font-family: var(--display); font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 600;
            color: var(--ink); letter-spacing: -0.04em; margin-bottom: 3.5rem;
        }
        
        .bento {
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
        }
        .bento__card {
            background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
            padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
            min-height: 280px; position: relative; overflow: hidden;
            transition: border-color 0.4s ease, transform 0.4s var(--ease-out);
        }
        .bento__card:hover { border-color: var(--accent-soft); transform: translateY(-4px); }
        .bento__card--wide { grid-column: span 2; }
        
        .bento__icon {
            font-family: var(--mono); font-size: 0.75rem; color: var(--accent);
            position: static; align-self: flex-end; margin-bottom: 2rem;
            background: var(--accent-soft); padding: 0.4rem 0.6rem; border-radius: 6px;
        }
        
        .bento__name { 
            font-family: var(--display); font-size: 1.5rem; font-weight: 600; 
            letter-spacing: -0.03em; color: var(--ink); margin-bottom: 0.5rem; 
        }
        .bento__desc { font-size: 0.95rem; color: var(--ink-body); line-height: 1.6; max-width: 40ch; }
        
        /* ── Writing Archive ── */
        .writing { padding-top: clamp(5rem, 10vw, 8rem); padding-bottom: clamp(5rem, 10vw, 8rem); border-top: 1px solid var(--border); }
        .writing__list { display: flex; flex-direction: column; gap: 0.75rem; }
        .post {
            display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center;
            padding: 1.5rem 2rem; background: var(--bg-card); border: 1px solid var(--border);
            border-radius: var(--radius);
            transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out);
        }
        .post:hover {
            background: var(--bg-elevated); border-color: var(--accent-soft);
            transform: translateX(4px);
        }
        .post__content { min-width: 0; }
        .post__meta-strip {
            display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem;
            font-family: var(--mono); font-size: 0.75rem; color: var(--ink-muted);
        }
        .post__cat { color: var(--accent); font-weight: 500; }
        .post__title {
            font-family: var(--display); font-size: 1.35rem; font-weight: 600; 
            color: var(--ink); letter-spacing: -0.02em; line-height: 1.3;
        }
        .post__arrow {
            color: var(--ink-dim); font-size: 1.25rem;
            transition: color 0.3s ease, transform 0.3s var(--ease-out);
        }
        .post:hover .post__arrow { color: var(--accent); transform: translateX(4px); }

        .writing__more {
            display: inline-flex; align-items: center; gap: 0.75rem;
            margin-top: 2rem; font-family: var(--mono); font-size: 0.85rem; font-weight: 500; color: var(--accent);
            transition: gap 0.3s var(--ease-out);
        }
        .writing__more:hover { gap: 1rem; }

        /* ── About ── */
        .about { padding-top: clamp(5rem, 10vw, 8rem); padding-bottom: clamp(5rem, 10vw, 8rem); border-top: 1px solid var(--border); }
        .about__inner {
            display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(3rem, 6vw, 6rem); align-items: start;
        }
        .about__text p {
            font-size: 1.05rem; color: var(--ink-body); line-height: 1.8; max-width: 50ch;
        }
        .about__text p + p { margin-top: 1.25rem; }
        .about__quote {
            margin-top: 2.5rem; padding-left: 1.5rem; border-left: 2px solid var(--accent);
            font-family: var(--sans); font-size: 1.35rem; color: var(--ink); line-height: 1.5; font-weight: 500;
            font-style: italic; letter-spacing: 0.01em;
        }
        .about__links { display: flex; flex-direction: column; gap: 0.75rem; }
        .link-card {
            display: flex; align-items: center; justify-content: space-between;
            padding: 1.25rem 1.5rem; background: var(--bg-card); border: 1px solid var(--border);
            border-radius: var(--radius);
            transition: border-color 0.3s ease, transform 0.3s var(--ease-out);
        }
        .link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
        .link-card__label { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--ink); letter-spacing: -0.02em; }
        .link-card__sub { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-muted); margin-top: 0.2rem; }
        .link-card__arrow { color: var(--ink-dim); transition: color 0.3s ease, transform 0.3s var(--ease-out); }
        .link-card:hover .link-card__arrow { color: var(--accent); transform: translateX(3px); }

        /* ── Footer ── */
        .footer {
            border-top: 1px solid var(--border); padding: 3rem 0;
            display: flex; justify-content: space-between; align-items: center;
            font-family: var(--mono); font-size: 0.75rem; color: var(--ink-muted);
        }
        .footer a { color: var(--ink-body); transition: color 0.3s ease; }
        .footer a:hover { color: var(--accent); }
        .footer__links { display: flex; gap: 2rem; }

        /* ── Reveal ── */
        .reveal {
            opacity: 0; transform: translateY(24px);
            transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
        }
        .reveal.visible { opacity: 1; transform: translateY(0); }

        @media (max-width: 1024px) { 
            .bento { grid-template-columns: 1fr 1fr; }
            .bento__card--wide { grid-column: span 2; }
            .hero-posts { grid-template-columns: 1fr 1fr; }
            .hero-card:last-child { display: none; }
        }
        @media (max-width: 768px) {
            .bento, .hero-posts { grid-template-columns: 1fr; }
            .bento__card--wide { grid-column: span 1; }
            .bento__card { padding: 1.5rem; min-height: 220px; }
            .hero-card:last-child { display: flex; }
            .about__inner { grid-template-columns: 1fr; gap: 3rem; }
            .post { grid-template-columns: 1fr; padding: 1.25rem; gap: 0.75rem; }
            .post__arrow { display: none; }
            
            .nav__toggle { display: flex; flex-direction: column; justify-content: center; }
            .nav__links {
                position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
                background: rgba(5, 5, 10, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
                flex-direction: column; justify-content: center; align-items: center; gap: 3rem;
                opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
                z-index: 90;
            }
            .nav__links a { font-size: 2.5rem; font-family: var(--display); letter-spacing: -0.03em; }
            body.nav-open .nav__links { opacity: 1; pointer-events: auto; }
            body.nav-open { overflow: hidden; }
            body.nav-open .nav__toggle-line:first-child { transform: translateY(4px) rotate(45deg); }
            body.nav-open .nav__toggle-line:last-child { transform: translateY(-4px) rotate(-45deg); }

            .hero__desc { font-size: 1.1rem; }
            .section-title { margin-bottom: 2rem; }
            .footer { flex-direction: column-reverse; gap: 1.5rem; text-align: center; }
        }
        @media (prefers-reduced-motion: reduce) {
            .reveal { opacity: 1; transform: none; transition: none; }
            * { transition-duration: 0s !important; }
        }
    
/* --- POST SPECIFIC STYLES --- */
        .nav__back { 
            display: inline-flex; align-items: center; gap: 0.5rem;
            font-family: var(--mono); font-size: 0.85rem; font-weight: 500; color: var(--ink-muted);
            transition: color 0.3s ease;
        }
        .nav__back:hover { color: var(--accent); }

        /* ── Post Hero ── */
        .post-hero {
            padding-top: 100px; padding-bottom: 3rem;
            max-width: 900px; margin: 0 auto; padding-left: clamp(1.5rem, 4vw, 3rem); padding-right: clamp(1.5rem, 4vw, 3rem);
        }
        .post-hero__meta {
            display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
            font-family: var(--mono); font-size: 0.85rem; color: var(--ink-muted);
        }
        .post-hero__cat { color: var(--accent); font-weight: 500; }
        .post-hero__title {
            font-family: var(--display); font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700;
            color: var(--ink); letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 2rem;
            text-wrap: balance;
        }
        
        /* ── Cover Image ── */
        .cover {
            width: 100%; max-width: 1200px; margin: 0 auto 4rem auto;
            padding: 0 clamp(1.5rem, 4vw, 3rem);
        }
        .cover__frame {
            position: relative; width: 100%; aspect-ratio: 21 / 9;
            border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
            background: var(--bg-card);
        }
        .cover__frame img {
            width: 100%; height: 100%; object-fit: cover; opacity: 0.85;
            transition: opacity 0.5s ease;
        }
        .cover__caption {
            margin-top: 1rem; font-family: var(--mono); font-size: 0.75rem;
            color: var(--ink-muted); text-align: right;
        }

        /* ── Article Content ── */
        .article {
            max-width: 65ch; margin: 0 auto; padding: 0 1.5rem 6rem 1.5rem;
            font-family: var(--sans);
            font-size: 1.125rem; line-height: 1.7; color: rgba(255, 255, 255, 0.85);
            text-wrap: pretty;
        }
        .article p { margin-bottom: 1.5rem; }
        .article a {
            color: var(--accent);
            text-decoration: none;
            border-bottom: 1px solid var(--border);
            transition: all 0.3s var(--ease-out);
        }
        .article a:hover {
            border-bottom-color: var(--accent);
            color: var(--ink-title);
        }
        
        .article img {
            max-width: 100%; height: auto; border-radius: var(--radius);
            margin: 2rem 0; display: block;
        }
        .article figure {
            margin: 2.5rem 0;
        }
        .article figure img { margin: 0; }
        .article figcaption {
            font-family: var(--mono); font-size: 0.85rem; color: var(--ink-muted);
            text-align: center; margin-top: 1rem;
        }
        
        .article pre {
            background: #0E0E11; border: 1px solid var(--border);
            border-radius: var(--radius); padding: 1.5rem; margin: 2.5rem 0;
            overflow-x: auto; max-width: 100%;
            font-family: var(--mono); font-size: 0.85rem; color: #D4D4D8; line-height: 1.6;
        }
        .article pre code {
            font-family: inherit; font-size: inherit; background: transparent; padding: 0; color: inherit;
        }
        .article p code, .article li code {
            background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border);
            padding: 0.1rem 0.3rem; border-radius: 4px; font-family: var(--mono);
            font-size: 0.85em; color: var(--accent);
        }
        
        .article h2 {
            font-family: var(--display); font-size: 2.25rem; font-weight: 600;
            color: var(--ink); letter-spacing: -0.03em; line-height: 1.2;
            margin: 4rem 0 1.5rem 0;
        }
        .article h3 {
            font-family: var(--display); font-size: 1.5rem; font-weight: 600;
            color: var(--ink); letter-spacing: -0.02em; line-height: 1.3;
            margin: 2.5rem 0 1rem 0;
        }
        
        /* Pull Quote */
        .pull-quote {
            margin: 3.5rem -2rem; padding: 2rem 2.5rem;
            border-left: 2px solid var(--accent); background: var(--bg-card);
            border-radius: 0 var(--radius) var(--radius) 0;
        }
        .pull-quote p {
            font-family: var(--sans); font-size: 1.75rem; font-style: italic; font-weight: 500;
            color: var(--ink); line-height: 1.4; margin: 0; letter-spacing: 0.01em;
        }

        /* Code Block */
        .code-block {
            margin: 2.5rem 0; border-radius: var(--radius); border: 1px solid var(--border);
            background: var(--bg-card); overflow: hidden;
        }
        .code-block__header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border);
            background: var(--bg-elevated);
        }
        .code-block__lang { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-muted); }
        .code-block__dots { display: flex; gap: 6px; }
        .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
        .code-block pre {
            padding: 1.5rem; margin: 0; overflow-x: auto;
            font-family: var(--mono); font-size: 0.85rem; color: #D4D4D8; line-height: 1.6;
        }
        .token-keyword { color: #C084FC; }
        .token-function { color: var(--accent); }
        .token-string { color: #A3E635; }
        .token-comment { color: var(--ink-muted); font-style: italic; }

        /* ── Related Posts Carousel ── */
        .related-posts {
            max-width: 1200px; margin: 4rem auto 0 auto;
            border-top: 1px solid var(--border);
            padding: 4rem clamp(1.5rem, 4vw, 3rem) 0 clamp(1.5rem, 4vw, 3rem);
        }
        .related-posts__header {
            margin-bottom: 2.5rem;
            display: flex; align-items: center; justify-content: space-between;
        }
        .related-posts__title {
            font-family: var(--display); font-size: 2rem; font-weight: 600;
            color: var(--ink); letter-spacing: -0.03em;
        }
        
        .related-carousel {
            display: flex; overflow-x: auto; gap: 1.5rem;
            padding-bottom: 2rem; scroll-snap-type: x mandatory;
            scrollbar-width: none; /* Firefox */
        }
        .related-carousel::-webkit-scrollbar { display: none; /* Safari and Chrome */ }
        
        .related-card {
            flex: 0 0 calc(25% - 1.125rem); min-width: 280px; scroll-snap-align: start;
            display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; padding: 1.25rem;
            border-radius: var(--radius); background: var(--bg-card);
            border: 1px solid var(--border); transition: all 0.4s var(--ease-out);
        }
        .related-carousel > .related-card:nth-child(n+5) {
            display: none !important;
        }
        .related-card:hover {
            border-color: var(--accent); background: var(--bg-elevated);
            transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0, 229, 255, 0.05);
        }
        .related-card__thumb {
            width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
            background: var(--border);
        }
        .related-card__thumb img {
            width: 100%; height: 100%; object-fit: cover;
            transition: transform 0.6s var(--ease-out);
        }
        .related-card__badge {
            background: var(--accent-soft); color: var(--accent);
            border: 1px solid rgba(94, 157, 255, 0.2);
            font-family: var(--mono); font-size: 0.65rem; font-weight: 600;
            padding: 0.15rem 0.4rem; border-radius: 4px;
            letter-spacing: 0.05em; text-transform: uppercase;
            display: inline-block; margin-right: 0.5rem; margin-bottom: 0.75rem;
        }
        .related-card__title {
            font-family: var(--display); font-size: 1.1rem; font-weight: 600; 
            color: var(--ink); line-height: 1.35; letter-spacing: -0.01em;
        }
        
        @media (max-width: 1024px) {
            .related-card { flex: 0 0 calc(33.333% - 1rem); }
        }
        @media (max-width: 768px) {
            .related-posts { padding: 3rem 1.25rem 0 1.25rem; }
            .related-carousel {
                margin: 0 -1.25rem; padding: 0 1.25rem 2rem 1.25rem;
                gap: 1rem;
            }
            .related-card { flex: 0 0 85%; min-width: 0; }
        }

        /* ── Footer ── */
        .footer {
            border-top: 1px solid var(--border); padding: 3rem 0;
            max-width: 1200px; margin: 0 auto; padding-left: clamp(1.5rem, 4vw, 3rem); padding-right: clamp(1.5rem, 4vw, 3rem);
            display: flex; justify-content: space-between; align-items: center;
            font-family: var(--mono); font-size: 0.75rem; color: var(--ink-muted);
        }
        .footer a { color: var(--ink-body); transition: color 0.3s ease; }
        .footer a:hover { color: var(--accent); }

        @media (max-width: 768px) {
            .pull-quote { margin: 2.5rem 0; padding: 1.5rem; }
            .pull-quote p { font-size: 1.4rem; }
            .cover__frame { aspect-ratio: 16 / 9; }
            .article { padding: 0 1.25rem 4rem 1.25rem; font-size: 1.05rem; }
            .article h2 { font-size: 1.75rem; margin: 3rem 0 1rem 0; }
            .post-hero { padding: 8rem 1.25rem 4rem 1.25rem; }
            .post-hero__title { font-size: 2.5rem; }
            .cover { padding: 0 1.25rem; }
            .footer { flex-direction: column-reverse; gap: 1.5rem; text-align: center; }
        }
#space-fabric {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Ghost Koenig Editor Classes */
.kg-width-wide { width: 100vw; max-width: 1040px; margin: 2rem auto; }
.kg-width-full { width: 100vw; max-width: 100vw; margin: 2rem 0 2rem calc(50% - 50vw); }
