        ::view-transition-old(root),
        ::view-transition-new(root) {
            animation-duration: 0.2s;
        }

        :root {
            --background: #fbf9f4;
            --on-surface: #1b1c19;
            --on-surface-variant: #3a3c3d;
            --primary: #0d0d0d;
            --secondary: #55624c;
            --surface-container-low: #f5f3ee;
            --outline-variant: #c4c7c7;
            --outline: #747878;
            --font-serif: 'Literata', Georgia, serif;
            --font-display: 'EB Garamond', Garamond, serif;
            --font-mono: 'JetBrains Mono', Courier, monospace;
            --max-content-width: 780px;
            --margin-page: 1.5rem;
            --inline-gap: 1.5rem;
            --indent-block: 2rem;
            --section-gap: 4rem;
            --border-color: rgba(27, 28, 25, 0.12);
            --text-primary: #1b1c19;
            --text-secondary: #3a3c3d;
        }

        html {
            background-color: var(--background);
        }

        html[data-theme="dark"] {
            --background: #121310;
            --on-surface: #e4e3dc;
            --on-surface-variant: #c4c7c5;
            --primary: #f2f1e8;
            --secondary: #a3b899;
            --surface-container-low: #1d1e1a;
            --outline-variant: #444746;
            --outline: #8e918f;
            --border-color: rgba(228, 227, 220, 0.12);
            --text-primary: #e4e3dc;
            --text-secondary: #c4c7c5;
        }

        a:focus-visible,
        button:focus-visible,
        input:focus-visible,
        textarea:focus-visible {
            outline: 2px solid var(--secondary);
            outline-offset: 4px;
        }

        body, header, footer, .post-card, .btn, .nav-links a, .logo {
            transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
        }

        #theme-toggle {
            background: transparent;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            color: var(--on-surface-variant);
            transition: color 0.3s ease;
        }

        #theme-toggle:hover {
            color: var(--primary);
        }

        #theme-toggle svg {
            display: block;
        }

        #theme-toggle .sun-icon {
            display: none;
        }

        #theme-toggle .moon-icon {
            display: block;
        }

        html[data-theme="dark"] #theme-toggle .sun-icon {
            display: block;
        }

        html[data-theme="dark"] #theme-toggle .moon-icon {
            display: none;
        }

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

        body {
            background-color: var(--background);
            color: var(--on-surface);
            font-family: var(--font-serif);
            line-height: 1.8;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }

        body > header {
            width: 100%;
            top: 0;
            border-bottom: 1px solid var(--outline-variant);
            background-color: var(--background);
        }

        .nav-container {
            max-width: var(--max-content-width);
            margin: 0 auto;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: baseline;
            gap: 1.75rem;
            padding: var(--indent-block) var(--margin-page);
        }

        @media (max-width: 768px) {
            .nav-container {
                flex-direction: column;
                /* Column flex: the cross axis is horizontal, so `baseline` pinned the
                   wordmark to the left edge instead of centering it over the links. */
                align-items: center;
            }
        }

        @media (max-width: 560px) {
            .nav-links {
                flex-wrap: wrap;
                justify-content: center;
                gap: 0.75rem 1rem;
                font-size: 0.68rem;
            }

            .hero-text h1 {
                font-size: 2.05rem;
                line-height: 1.22;
            }

            .hero-section {
                gap: 1.25rem;
            }

            .hero-tree-stage {
                max-height: 320px;
            }
        }

        .logo {
            font-family: var(--font-display);
            font-size: 2rem;
            font-weight: 500;
            line-height: 1.1;
            color: var(--primary);
            text-decoration: none;
            transition: color 0.1s ease;
        }

        .logo:hover {
            color: var(--secondary);
        }

        .nav-links {
            display: flex;
            gap: 0.9rem;
            list-style: none;
            font-family: var(--font-mono);
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            font-weight: 500;
            align-items: center;
        }

        .nav-links a {
            color: var(--on-surface-variant);
            text-decoration: none;
            transition: color 0.1s ease;
        }

        .nav-links a:hover {
            color: var(--primary);
        }

        .lang-btn {
            background: transparent;
            border: none;
            cursor: pointer;
            font-family: var(--font-mono);
            font-size: 0.75rem;
            font-weight: 500;
            color: var(--on-surface-variant);
            text-transform: uppercase;
            padding: 0 0.25rem;
            transition: color 0.1s ease;
        }

        .lang-btn:hover {
            color: var(--primary);
        }

        .lang-btn.active {
            color: var(--primary);
            text-decoration: underline;
            text-underline-offset: 4px;
        }

        .lang-separator {
            color: var(--outline-variant);
            user-select: none;
            font-size: 0.75rem;
        }

        .lang-form {
            display: inline-flex;
            align-items: center;
            gap: 0.1rem;
        }

        main {
            flex: 1;
            max-width: var(--max-content-width);
            width: 100%;
            margin: 0 auto;
            padding: var(--section-gap) var(--margin-page);
        }

        footer {
            border-top: 1px solid var(--outline-variant);
            background-color: var(--background);
            margin-top: auto;
            width: 100%;
        }

        .footer-container {
            max-width: var(--max-content-width);
            margin: 0 auto;
            padding: 3rem var(--margin-page);
            display: flex;
            flex-direction: column;
            gap: 1rem;
            font-family: var(--font-mono);
            font-size: 0.75rem;
            color: var(--on-surface-variant);
        }

        .footer-grid {
            display: grid;
            grid-template-columns: 1.4fr 1fr 1fr;
            gap: 2rem;
            align-items: start;
        }

        .footer-col {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            min-width: 0;
        }

        .footer-heading {
            margin: 0;
            font-size: 0.72rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--secondary);
        }

        .footer-list {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .footer-list a,
        .footer-email {
            color: var(--on-surface-variant);
            text-decoration: none;
            border-bottom: 1px solid transparent;
            transition: color 0.15s ease, border-color 0.15s ease;
        }

        .footer-list a:hover,
        .footer-email:hover {
            color: var(--primary);
            border-color: var(--outline-variant);
        }

        .footer-email {
            align-self: flex-start;
            padding: 0;
            font: inherit;
            font-family: var(--font-mono);
            background: none;
            border-top: 0;
            border-right: 0;
            border-left: 0;
            cursor: pointer;
            word-break: break-word;
        }

        .footer-email.is-copied {
            color: var(--secondary);
        }

        @media (max-width: 768px) {
            /* Mobile: Contact and Elsewhere stack on the left, and the longer Pages
               list takes the right column, spanning both rows. */
            .footer-grid {
                grid-template-columns: 1fr auto;
                gap: 1.75rem 2rem;
            }

            .footer-grid > .footer-col:nth-child(1) {
                grid-column: 1;
                grid-row: 1;
            }

            .footer-grid > .footer-col:nth-child(2) {
                grid-column: 2;
                grid-row: 1 / span 2;
            }

            .footer-grid > .footer-col:nth-child(3) {
                grid-column: 1;
                grid-row: 2;
            }
        }

        .footer-copy {
            margin: 2.5rem 0 0;
            padding-top: 1rem;
            border-top: 1px solid var(--outline-variant);
            font-size: 0.7rem;
            opacity: 0.8;
            text-align: center;
        }

        /* Post Card & List Elements */
        .posts-wrapper {
            display: flex;
            flex-direction: column;
            gap: var(--section-gap);
            transition: opacity 0.2s ease-in;
        }

        .posts-wrapper.htmx-swapping {
            opacity: 0;
        }

        .post-card {
            border-left: 2px solid var(--outline-variant);
            padding-left: 1.5rem;
            transition: border-color 0.3s ease;
        }

        .post-card:hover {
            border-color: var(--secondary);
        }

        .post-item-meta {
            display: flex;
            align-items: center;
            /* The date is localized (DATE_FORMAT), so it can be longer than the English
               one: wrap instead of pushing the line past the measure on narrow screens. */
            flex-wrap: wrap;
            gap: 0.4rem 1rem;
            margin-bottom: 0.75rem;
            font-family: var(--font-mono);
            font-size: 0.75rem;
        }

        .category-badge {
            font-family: var(--font-mono);
            color: var(--secondary);
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 500;
        }

        .post-item-date {
            color: var(--on-surface-variant);
        }

        .post-title {
            font-family: var(--font-display);
            font-size: 2rem;
            font-weight: 500;
            line-height: 1.3;
            margin-bottom: 1rem;
        }

        .post-title a {
            color: var(--primary);
            text-decoration: none;
            transition: color 0.2s ease;
        }

        .post-title a:hover {
            color: var(--secondary);
            text-decoration: underline;
            text-decoration-color: var(--outline-variant);
            text-underline-offset: 4px;
        }

        .post-summary {
            color: var(--on-surface-variant);
            font-size: 0.95rem;
            line-height: 1.8;
            margin-bottom: 1.5rem;
        }

        .post-card .post-summary {
            margin-bottom: 0;
        }

        /* Blog Header */
        .blog-header {
            margin-bottom: var(--section-gap);
            text-align: left;
            border-bottom: 1px solid var(--outline-variant);
        }

        .blog-header h1 {
            font-family: var(--font-display);
            font-size: 3rem;
            font-weight: 500;
            margin-bottom: 1rem;
            color: var(--primary);
            letter-spacing: -0.02em;
        }

        .blog-header p {
            color: var(--on-surface-variant);
            font-size: 1.1rem;
            line-height: 1.8;
        }

        /* Detail Elements */
        .post-detail-container {
            max-width: var(--max-content-width);
            margin: 0 auto;
        }

        .back-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--on-surface-variant);
            text-decoration: none;
            font-family: var(--font-mono);
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 500;
            margin-bottom: 2rem;
            transition: color 0.2s ease;
        }

        .back-link:hover {
            color: var(--primary);
        }

        .post-header {
            margin-bottom: 2.5rem;
            border-bottom: 1px solid var(--outline-variant);
        }

        .post-header-title {
            font-family: var(--font-display);
            font-size: 3rem;
            font-weight: 500;
            line-height: 1.2;
            margin-bottom: 1rem;
            color: var(--primary);
        }

        .post-subtitle {
            font-family: var(--font-serif);
            font-size: 1.15rem;
            line-height: 1.7;
            color: var(--on-surface-variant);
            margin-bottom: 1.5rem;
            max-width: 42em;
        }

        .post-main-image-container {
            margin-bottom: 2.5rem;
            border-radius: 0;
            overflow: hidden;
            border: 1px solid var(--outline-variant);
        }

        .post-main-image-container img {
            width: 100%;
            height: auto;
            display: block;
            object-fit: cover;
            max-height: 450px;
        }

        .post-content {
            font-family: var(--font-serif);
            font-size: 1.1rem;
            line-height: 1.8;
            /* Measure safety net: keeps prose from stretching past a comfortable
               line length if the page shell widens further. `em` is used instead
               of `ch` because Literata's zero glyph (0.58em) is much wider than
               its average character (0.48em), so `ch` would understate the cap. */
            max-width: 42em;
            color: var(--on-surface);
            margin-bottom: 4rem;
            padding-bottom: 4rem;
            border-bottom: 1px solid var(--outline-variant);
        }

        /* README images arrive from GitHub at arbitrary intrinsic widths, so
           they need an explicit ceiling or they overflow the prose measure.
           `height: auto` matters: the sanitizer keeps authored width/height
           attributes, and a fixed height would distort those images. */
        .post-content img {
            max-width: 100%;
            height: auto;
        }

        /* Letras Capitulares (Drop Cap) para el primer párrafo del artículo */
        .post-content > p:first-of-type::first-letter {
            float: left;
            font-size: 4rem;
            line-height: 3.2rem;
            padding-top: 4px;
            padding-right: 8px;
            padding-left: 3px;
            font-family: var(--font-display);
            font-weight: 500;
            color: var(--secondary);
        }

        .post-content p {
            color: var(--on-surface);
            margin-bottom: 1.5rem;
        }

        .post-content h1,
        .post-content h2,
        .post-content h3,
        .post-content h4,
        .post-content h5,
        .post-content h6 {
            font-family: var(--font-display);
            color: var(--primary);
            margin-top: 2.5rem;
            margin-bottom: 1.2rem;
            font-weight: 500;
            line-height: 1.3;
        }

        .post-content h1 { font-size: 2.2rem; }
        .post-content h2 { font-size: 1.8rem; border-bottom: 1px solid var(--outline-variant); padding-bottom: 0.4rem; }
        .post-content h3 { font-size: 1.4rem; }
        .post-content h4 { font-size: 1.2rem; }
        .post-content h5 { font-size: 1.1rem; }
        .post-content h6 { font-size: 1rem; }

        .post-content ul,
        .post-content ol {
            margin-bottom: 1.8rem;
            padding-left: 2.5rem;
        }

        .post-content ul {
            list-style-type: disc;
        }

        .post-content ol {
            list-style-type: decimal;
        }

        .post-content li {
            margin-bottom: 0.6rem;
        }

        .post-content li p {
            margin-bottom: 0.5rem;
        }

        .post-content table {
            display: table;
            width: 100%;
            border-collapse: collapse;
            margin-top: 2rem;
            margin-bottom: 2rem;
            font-size: 0.95rem;
            border-top: 2px solid var(--primary);
            border-bottom: 2px solid var(--primary);
        }

        .post-content th {
            background-color: transparent;
            font-weight: 600;
            color: var(--primary);
            border-bottom: 1px solid var(--primary);
            border-top: none;
            border-left: none;
            border-right: none;
            padding: 0.75rem 1rem;
            text-align: left;
        }

        .post-content td {
            border: none;
            border-bottom: 1px solid var(--outline-variant);
            padding: 0.75rem 1rem;
            text-align: left;
        }

        .post-content tr:last-child td {
            border-bottom: none;
        }

        .post-content pre {
            background-color: var(--surface-container-low);
            border: 1px solid var(--outline-variant);
            padding: 1.2rem;
            overflow-x: auto;
            margin-bottom: 1.8rem;
            border-radius: 4px;
        }

        .post-content code {
            font-family: var(--font-mono);
            font-size: 0.85rem;
            background-color: var(--surface-container-low);
            padding: 0.2rem 0.4rem;
            border-radius: 3px;
            color: var(--primary);
        }

        .post-content pre code {
            background-color: transparent;
            padding: 0;
            border-radius: 0;
            color: inherit;
            display: block;
        }

        .post-content blockquote {
            border-left: none;
            border-top: 1px solid var(--outline-variant);
            border-bottom: 1px solid var(--outline-variant);
            padding: 1.5rem 0;
            margin: 2.5rem 1.5rem;
            font-family: var(--font-display);
            font-size: 1.35rem;
            line-height: 1.5;
            text-align: center;
            color: var(--secondary);
            font-style: italic;
        }

        .post-content a[href] {
            color: var(--primary);
            text-decoration: underline dotted var(--secondary);
            text-underline-offset: 5px;
            text-decoration-thickness: 1.5px;
            transition: color 0.2s ease, text-decoration-color 0.2s ease;
        }

        .post-content a[href]:visited,
        .post-content a[href]:active {
            color: var(--primary);
        }

        .post-content a[href]:hover {
            color: var(--secondary);
            text-decoration: underline solid var(--secondary);
        }

        /* Buttons & Forms styling */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0.5rem 1rem;
            font-family: var(--font-mono);
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 500;
            text-decoration: none;
            transition: all 0.2s ease;
            cursor: pointer;
            border: 1px solid var(--outline);
            border-radius: 0;
            background: transparent;
            color: var(--primary);
        }

        .btn-primary {
            background: var(--primary);
            color: var(--background);
            border-color: var(--primary);
        }

        .btn-primary:hover {
            background: var(--secondary);
            border-color: var(--secondary);
        }

        .btn-secondary {
            border-color: var(--outline-variant);
            color: var(--on-surface-variant);
        }

        .btn-secondary:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-family: var(--font-mono);
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-weight: 500;
            color: var(--on-surface-variant);
        }

        .form-control {
            width: 100%;
            padding: 0.75rem 1rem;
            border-radius: 0;
            background-color: var(--surface-container-low);
            border: 1px solid var(--outline-variant);
            color: var(--on-surface);
            font-family: inherit;
            font-size: 0.95rem;
            transition: border-color 0.2s ease;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary);
            background-color: var(--background);
        }

        .form-control::placeholder {
            color: var(--outline);
        }

        .notice {
            background-color: var(--surface-container-low);
            border: 1px solid var(--outline-variant);
            padding: 1.25rem 1.5rem;
            color: var(--primary);
            margin-bottom: 2rem;
            font-size: 0.95rem;
        }

        /* Pagination */
        .pagination-nav {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 1rem;
            margin-top: 2rem;
        }

        .pagination-info {
            font-family: var(--font-mono);
            font-size: 0.75rem;
            color: var(--on-surface-variant);
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        /* Hero Section */
        .hero-section {
            display: grid;
            grid-template-columns: 1.05fr .95fr;
            align-items: center;
            gap: 2.5rem;
            margin-bottom: 2rem;
        }

        .hero-text {
            min-width: 0;
        }

        .hero-text h1 {
            font-family: var(--font-display);
            font-size: 2.5rem;
            font-weight: 500;
            color: var(--primary);
            line-height: 1.25;
            margin-bottom: 1rem;
        }

        .hero-text p {
            font-family: var(--font-serif);
            font-size: 1.1rem;
            color: var(--on-surface-variant);
            line-height: 1.6;
        }

        /* Who writes this: name and discipline under the thesis line */
        .hero-text p.hero-identity {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
            margin-top: 1.5rem;
            font-family: var(--font-mono);
            font-size: 0.68rem;
            line-height: 1.5;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--secondary);
        }

        .hero-identity-name {
            text-wrap: balance;
        }

        .hero-identity-role {
            font-family: var(--font-serif);
            font-size: 1.05rem;
            font-style: italic;
            letter-spacing: normal;
            text-transform: none;
            color: var(--on-surface-variant);
            max-width: 42ch;
        }

        /* Hero tree: drawn on canvas, generated per load */
        .hero-tree-stage {
            position: relative;
            width: 100%;
            aspect-ratio: 5 / 6;
            max-height: 420px;
        }

        .hero-tree-stage canvas {
            display: block;
            width: 100%;
            height: 100%;
        }

        .hero-tree-fallback {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            filter: grayscale(100%) contrast(1.05);
        }

        @media (max-width: 768px) {
            .hero-section {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
            .hero-tree-stage {
                aspect-ratio: 1 / 1;
                max-height: 380px;
            }
        }

        /* Section Container & Title */
        .section-container {
            margin-top: 3rem;
            margin-bottom: 3rem;
        }

        /* Error pages (404 / 500) */
        .error-page {
            min-height: 52vh;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
        }

        .error-code {
            font-family: var(--font-mono);
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.2em;
            color: var(--secondary);
            margin-bottom: 1rem;
        }

        .error-title {
            font-family: var(--font-display);
            font-size: 2.6rem;
            font-weight: 500;
            line-height: 1.15;
            letter-spacing: -0.02em;
            color: var(--primary);
            margin-bottom: 0.85rem;
        }

        .error-message {
            font-family: var(--font-serif);
            font-size: 1.05rem;
            line-height: 1.7;
            color: var(--on-surface-variant);
            max-width: 46ch;
            margin-bottom: 1.75rem;
        }

        .section-title {
            font-family: var(--font-mono);
            font-size: 0.95rem;
            font-weight: 700;
            letter-spacing: 0.15em;
            text-transform: uppercase;
            color: var(--secondary);
            margin-bottom: 2rem;
            border-bottom: 1px solid var(--outline-variant);
            padding-bottom: 0.5rem;
        }

        /* Section head: label on the left, exit link on the right */
        .section-head {
            display: flex;
            flex-wrap: wrap;
            align-items: baseline;
            justify-content: space-between;
            gap: 0.4rem 1rem;
            border-bottom: 1px solid var(--outline-variant);
            padding-bottom: 0.5rem;
            margin-bottom: 2rem;
        }

        .section-head .section-title {
            margin-bottom: 0;
            border-bottom: 0;
            padding-bottom: 0;
        }

        .section-link {
            font-family: var(--font-mono);
            font-size: 0.75rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--secondary);
            text-decoration: none;
            border-bottom: 1px solid var(--outline-variant);
            transition: color 0.2s ease, border-color 0.2s ease;
        }

        .section-link:hover {
            color: var(--primary);
            border-color: var(--secondary);
        }

        /* Short introductory line under a section head (home) */
        .section-lede {
            margin: 0;
            max-width: 62ch;
            font-family: var(--font-serif);
            font-size: 1.1rem;
            line-height: 1.8;
            color: var(--on-surface-variant);
        }

        /* Dividers */
        .divider {
            border: 0;
            height: 1px;
            background-image: linear-gradient(to right, rgba(0, 0, 0, 0), var(--outline-variant) 20%, var(--outline-variant) 80%, rgba(0, 0, 0, 0));
            margin: 3.5rem 0;
        }

        .asterisk-divider {
            text-align: center;
            color: var(--secondary);
            font-family: var(--font-mono);
            font-size: 1.2rem;
            letter-spacing: 0.5em;
            margin: 3.5rem 0;
            user-select: none;
        }

        /* Projects List */
        .projects-list {
            list-style: none;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        /* Project cards: design doc 4.1, pre-video edition */
        .projects-list li.project-card {
            display: flex;
            align-items: stretch;
            flex-direction: column;
            gap: 0.5rem;
            min-width: 0;
            border-left: 2px solid var(--outline-variant);
            padding-left: 1.5rem;
            transition: border-color 0.3s ease;
        }

        .projects-list li.project-card:hover {
            border-color: var(--secondary);
        }

        .project-card-top {
            display: flex;
            align-items: baseline;
            gap: 0.75rem;
        }

        .external-link {
            color: var(--on-surface-variant);
            text-decoration: none;
            transition: color 0.15s ease;
        }

        .external-link:hover {
            color: var(--secondary);
        }

        .project-topics {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            padding: 0;
            list-style: none;
        }

        /* Authored framing above the README */
        .project-lede {
            font-size: 1.25rem;
            line-height: 1.8;
            color: var(--on-surface);
            max-width: 72ch;
            margin-bottom: 2.5rem;
        }

        .project-lede p {
            margin: 0 0 1rem;
        }

        .project-lede p:last-child {
            margin-bottom: 0;
        }

        .readme-kicker {
            font-family: var(--font-mono);
            font-size: 0.62rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--secondary);
            border-bottom: 1px solid var(--outline-variant);
            padding-bottom: 0.5rem;
            margin-bottom: 1.5rem;
        }

        .project-empty-readme {
            font-style: italic;
            color: var(--on-surface-variant);
        }

        .project-link {
            font-family: var(--font-serif);
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--primary);
            text-decoration: none;
            display: inline-block;
            transition: color 0.15s ease;
        }

        .project-link:hover {
            color: var(--secondary);
        }

        .project-description {
            font-size: 0.95rem;
            color: var(--on-surface-variant);
            line-height: 1.6;
            display: block;
        }

        /* Post cover (home + /articles/): closes the entry, below the text and inside
           the article (mockups/listings.html, "lead" variant). Grayscale at rest and
           in colour on hover, like the portrait treatments on the About page. */
        .post-cover {
            margin-top: 1.5rem;
            border: 1px solid var(--outline-variant);
            overflow: hidden;
            background-color: var(--surface-container-low);
        }

        .post-cover-image {
            display: block;
            width: 100%;
            height: 240px;
            object-fit: cover;
            border-radius: 0;
            filter: grayscale(100%) contrast(1.1);
            transition: filter 0.3s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .post-card:hover .post-cover-image {
            filter: grayscale(0%) contrast(1);
            transform: scale(1.03);
        }

        @media (max-width: 768px) {
            .post-cover-image {
                height: 180px;
            }
        }

        /* About Page Components */
        .about-hero {
            display: flex;
            align-items: center;
            gap: 3rem;
            margin-bottom: 3rem;
        }

        .about-portrait-container {
            flex: 0 0 220px;
            width: 220px;
            height: 220px;
            border: 1px solid var(--outline-variant);
            border-radius: 12px;
            overflow: hidden;
            background-color: var(--surface-container-low);
        }

        /* Portrait stack: the treated (gradient-mapped) image sits on top of the
           original colour photo, so hovering fades the treatment back to the person.
           Assets: static/images/foto-perfil-gradmap{,-220}.webp (mockups/_gen_profile_effects.py). */
        .about-portrait-container,
        .about-teaser-portrait {
            position: relative;
        }

        .about-portrait-container picture,
        .about-teaser-portrait picture {
            position: absolute;
            inset: 0;
            display: block;
            /* Both layers must share the same timing: if only the treated layer
               transitions, the colour layer snaps and the reveal reads as two moves. */
            transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .about-portrait-container img,
        .about-teaser-portrait img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .about-portrait-container .portrait-treated,
        .about-teaser-portrait .portrait-treated {
            transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .about-portrait-container:hover .portrait-treated,
        .about-teaser-portrait:hover .portrait-treated {
            opacity: 0;
        }

        .about-portrait-container:hover picture {
            transform: scale(1.05);
        }

        /* Home teaser: the only top-level section that had no entry point on the home page */
        .about-teaser {
            display: flex;
            align-items: center;
            gap: 1.75rem;
        }

        .about-teaser-portrait {
            flex: 0 0 132px;
            width: 132px;
            height: 132px;
            border: 1px solid var(--outline-variant);
            border-radius: 12px;
            overflow: hidden;
            background-color: var(--surface-container-low);
        }

        .about-teaser .section-lede {
            flex: 1 1 26ch;
            min-width: 0;
        }

        .about-bio {
            flex: 1;
        }

        .about-bio h1 {
            font-family: var(--font-display);
            font-size: 3.5rem;
            font-weight: 500;
            margin-bottom: 1rem;
            color: var(--primary);
        }

        .about-bio p {
            font-size: 1.1rem;
            color: var(--on-surface-variant);
            line-height: 1.8;
        }

        .about-bio p + p {
            margin-top: 1rem;
        }

        /* Timeline/Experience */
        .about-timeline {
            display: flex;
            flex-direction: column;
            gap: 2rem;
            margin-top: 1.5rem;
        }

        .about-timeline-item {
            border-left: 2px solid var(--outline-variant);
            padding-left: 1.5rem;
            position: relative;
        }

        .about-timeline-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            font-family: var(--font-mono);
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            margin-bottom: 0.5rem;
        }

        .about-timeline-role {
            font-weight: 700;
            color: var(--primary);
        }

        .about-timeline-date {
            color: var(--on-surface-variant);
        }

        .about-timeline-company {
            font-family: var(--font-display);
            font-size: 1.25rem;
            font-weight: 500;
            margin-bottom: 0.5rem;
            color: var(--primary);
        }

        .about-timeline-desc {
            font-size: 0.95rem;
            color: var(--on-surface-variant);
            line-height: 1.6;
        }

        /* Skills */
        .about-skills {
            display: grid;
            grid-template-columns: 9.5rem 1fr;
            gap: 0.7rem 1.5rem;
            margin: 1.5rem 0 0;
        }

        .about-skills dt {
            font-family: var(--font-mono);
            font-size: 0.6rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--secondary);
            padding-top: 0.4rem;
        }

        .about-skills dd {
            margin: 0;
            font-family: var(--font-serif);
            font-size: 1.05rem;
            line-height: 1.6;
            color: var(--on-surface-variant);
        }

        @media (max-width: 560px) {
            .about-skills {
                grid-template-columns: 1fr;
                gap: 0.3rem;
            }

            .about-skills dt {
                padding-top: 0.8rem;
            }
        }

        .skill-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0.5rem 1rem;
            font-family: var(--font-mono);
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            border: 1px solid var(--outline-variant);
            color: var(--on-surface-variant);
            background-color: var(--surface-container-low);
            transition: all 0.2s ease;
        }

        .skill-pill:hover {
            border-color: var(--primary);
            color: var(--primary);
            background-color: var(--background);
        }

        .about-links {
            display: flex;
            gap: 1.5rem;
            margin-top: 1.5rem;
        }

        @media (max-width: 768px) {
            .about-hero {
                flex-direction: column;
                align-items: stretch;
                gap: 1.5rem;
            }
            .about-portrait-container {
                width: 220px;
                height: 220px;
                margin: 0 auto;
                border-radius: 12px;
                flex: none;
            }
            .about-timeline-header {
                flex-direction: column;
                gap: 0.25rem;
            }
            .about-teaser {
                gap: 1.25rem;
            }
            .about-teaser-portrait {
                flex: 0 0 104px;
                width: 104px;
                height: 104px;
            }
        }

        /* Touch: no hover, so the reveal happens on press instead of never */
        @media (hover: none) {
            .about-portrait-container:active .portrait-treated,
            .about-teaser-portrait:active .portrait-treated {
                opacity: 0;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .about-portrait-container picture,
            .about-teaser-portrait picture,
            .about-portrait-container .portrait-treated,
            .about-teaser-portrait .portrait-treated {
                transition: none;
            }
            .about-portrait-container:hover picture {
                transform: none;
            }
        }

        /* Syntax Highlighting (Pygments - codehilite) - Integrated with site theme */
        .codehilite { background: transparent; }
        .codehilite .hll { background-color: var(--outline-variant); }
        .codehilite .c { color: #5f6464; font-style: italic; } /* Comment (WCAG-checked on paper) */
        .codehilite .k { color: var(--secondary); font-weight: bold; } /* Keyword */
        .codehilite .o { color: var(--on-surface-variant); } /* Operator */
        .codehilite .m { color: #2d5a80; } /* Literal.Number (soft blue) */
        .codehilite .s { color: #63705c; } /* Literal.String (soft olive) */
        .codehilite .nb { color: #a05a46; } /* Name.Builtin (soft terracotta) */
        .codehilite .nc { color: #a05a46; font-weight: bold; } /* Name.Class */
        .codehilite .nf { color: #a05a46; font-weight: bold; } /* Name.Function */
        .codehilite .nt { color: var(--secondary); font-weight: bold; } /* Name.Tag */
        .codehilite .nv { color: var(--on-surface-variant); } /* Name.Variable */
        .codehilite .ow { color: var(--secondary); font-weight: bold; } /* Operator.Word */

        /* Dark Theme Syntax Highlighting adjustments */
        html[data-theme="dark"] .codehilite .c { color: var(--outline); font-style: italic; }
        html[data-theme="dark"] .codehilite .k { color: var(--secondary); font-weight: bold; }
        html[data-theme="dark"] .codehilite .o { color: var(--on-surface-variant); }
        html[data-theme="dark"] .codehilite .m { color: #8fadc9; }
        html[data-theme="dark"] .codehilite .s { color: #b0bf97; }
        html[data-theme="dark"] .codehilite .nb { color: #e2a58b; }
        html[data-theme="dark"] .codehilite .nc { color: #e2a58b; font-weight: bold; }
        html[data-theme="dark"] .codehilite .nf { color: #e2a58b; font-weight: bold; }
        html[data-theme="dark"] .codehilite .nt { color: var(--secondary); font-weight: bold; }
        html[data-theme="dark"] .codehilite .nv { color: var(--on-surface-variant); }
        html[data-theme="dark"] .codehilite .ow { color: var(--secondary); font-weight: bold; }

        /* Accessibility additions */
        .skip-link {
            position: absolute;
            left: -9999px;
            top: 0;
            background: var(--primary);
            color: var(--background);
            padding: 0.75rem 1rem;
            z-index: 100;
            font-family: var(--font-mono);
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .skip-link:focus {
            left: 0.5rem;
            top: 0.5rem;
        }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        #theme-toggle,
        .lang-btn {
            min-width: 44px;
            min-height: 44px;
        }

        /* ── About: the translator schematic ─────────────────── */
        .schematic-figure {
            margin: 2.5rem 0 0;
        }

        .schematic {
            display: block;
            width: 100%;
            height: auto;
            overflow: visible;
        }

        .schematic .sch-label {
            font-family: var(--font-mono);
            font-size: 10px;
            letter-spacing: 1.2px;
            fill: var(--secondary);
        }

        .schematic .sch-sub {
            font-family: var(--font-serif);
            font-size: 11.5px;
            fill: var(--on-surface-variant);
        }

        .schematic .sch-code {
            font-family: var(--font-mono);
            font-size: 11px;
            fill: var(--primary);
        }

        .schematic .sch-machine {
            font-family: var(--font-mono);
            font-size: 8.5px;
            letter-spacing: 1.8px;
            fill: var(--outline);
        }

        .schematic .sch-frame {
            fill: var(--surface-container-low);
            stroke: var(--outline-variant);
            stroke-width: 1;
        }

        .schematic .sch-tick,
        .schematic .sch-rail {
            stroke: var(--outline-variant);
            stroke-width: 1;
            fill: none;
        }

        .schematic .sch-rail {
            stroke-dasharray: 1 4;
            opacity: 0.8;
        }

        .schematic .sch-wire {
            stroke: var(--outline);
            stroke-width: 1;
            fill: none;
            stroke-dasharray: 3 5;
            animation: sch-flow 1.6s linear infinite;
        }

        .schematic .sch-organic {
            stroke: var(--primary);
            stroke-width: 1.3;
            fill: none;
        }

        .schematic .sch-simplify {
            stroke: var(--on-surface-variant);
            stroke-width: 1;
            fill: none;
        }

        .schematic .sch-trace {
            stroke: var(--secondary);
            stroke-width: 1.3;
            fill: none;
        }

        .schematic .sch-dot {
            fill: var(--secondary);
        }

        .schematic .sch-pad {
            fill: var(--background);
            stroke: var(--secondary);
            stroke-width: 1;
        }

        .schematic .sch-pulse {
            fill: var(--secondary);
        }

        .schematic-figcaption {
            margin: 1rem 0 0;
            font-family: var(--font-mono);
            font-size: 0.62rem;
            letter-spacing: 0.06em;
            color: var(--outline);
            line-height: 1.7;
        }

        @keyframes sch-flow {
            to {
                stroke-dashoffset: -16;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .schematic .sch-wire {
                animation: none;
            }
            .schematic .sch-pulse {
                display: none;
            }
        }

        @media (max-width: 560px) {

            .schematic .sch-label {
                font-size: 10px;
            }
            .schematic .sch-code {
                font-size: 11px;
            }
        }
        .schematic-compact {
            display: none;
            border-top: 1px solid var(--outline-variant);
            border-bottom: 1px solid var(--outline-variant);
            padding: 0.9rem 0;
            gap: 0.55rem;
        }

        .schematic-compact .sc-row {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 1rem;
            border-bottom: 1px dotted var(--outline-variant);
            padding-bottom: 0.55rem;
        }

        .schematic-compact .sc-row:last-child {
            border-bottom: 0;
            padding-bottom: 0;
        }

        .schematic-compact .sc-from {
            font-family: var(--font-mono);
            font-size: 0.6rem;
            letter-spacing: 0.14em;
            color: var(--secondary);
        }

        .schematic-compact .sc-to {
            font-family: var(--font-mono);
            font-size: 0.66rem;
            color: var(--primary);
            overflow-wrap: anywhere;
            text-align: right;
        }

        @media (max-width: 560px) {
            .schematic-compact {
                display: grid;
            }
            svg.translator-schematic {
                display: none;
            }
        }        /* ── Mermaid diagrams inside READMEs ─────────────────── */
        .mermaid {
            margin: 1.75rem 0;
            text-align: center;
            overflow-x: auto;
        }

        .mermaid svg {
            max-width: 100%;
            height: auto;
        }        /* ── Project detail: repo link inside the header meta ── */
        .project-repo-link {
            color: var(--secondary);
            text-decoration: none;
            border-bottom: 1px solid var(--outline-variant);
            padding-bottom: 1px;
            transition: color 0.2s ease, border-color 0.2s ease;
        }

        .project-repo-link:hover {
            color: var(--primary);
            border-color: var(--secondary);
        }        /* ── About: contact ──────────────────────────────────── */
        .contact-email {
            margin: 1rem 0 0;
            font-family: var(--font-mono);
            font-size: 0.7rem;
            letter-spacing: 0.04em;
            color: var(--outline);
        }

        .btn.is-copied {
            border-color: var(--secondary);
            color: var(--secondary);
        }        /* ── Contact links: wrap instead of overflowing ──────── */
        .about-links {
            flex-wrap: wrap;
            gap: 0.75rem 1.25rem;
        }

        /* ── Compact schematic rows (mobile) ─────────────────── */
        .schematic-compact .sc-row {
            display: grid;
            grid-template-columns: auto auto 1fr;
            align-items: center;
            gap: 0.7rem;
        }

        .sc-mini {
            display: block;
            width: 76px;
            height: 20px;
            overflow: visible;
        }

        @media (max-width: 380px) {
            .sc-mini {
                width: 60px;
            }
        }        /* ── Approach page ───────────────────────────────────── */
        .approach-hero {
            padding: 1rem 0 0;
        }

        .approach-kicker {
            font-family: var(--font-mono);
            font-size: 0.65rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--secondary);
            margin: 0 0 0.6rem;
        }

        .approach-hero h1 {
            font-family: var(--font-display);
            font-size: 3rem;
            font-weight: 500;
            line-height: 1.1;
            margin: 0 0 1rem;
            color: var(--primary);
        }

        .approach-lede {
            font-family: var(--font-serif);
            font-size: 1.1rem;
            color: var(--on-surface-variant);
            max-width: 58ch;
            margin: 0;
        }

        .approach-back {
            margin-top: 2.5rem;
            font-family: var(--font-mono);
            font-size: 0.68rem;
            letter-spacing: 0.08em;
        }

        .approach-back a {
            color: var(--secondary);
            text-decoration: none;
            border-bottom: 1px solid var(--outline-variant);
        }

        .approach-back a:hover {
            color: var(--primary);
            border-color: var(--secondary);
        }

        .about-hero-links {
            display: flex;
            flex-wrap: wrap;
            gap: 0.6rem 1.4rem;
            align-items: center;
            margin: 1rem 0 0;
        }

        .about-approach-link {
            display: inline-block;
            font-family: var(--font-mono);
            font-size: 0.68rem;
            letter-spacing: 0.08em;
            color: var(--secondary);
            text-decoration: none;
            border-bottom: 1px solid var(--outline-variant);
        }

        .about-approach-link:hover {
            color: var(--primary);
            border-color: var(--secondary);
        }

        /* ── Figure tokens shared with the translator schematic ─ */
        .sch-tiny {
            font-family: var(--font-mono);
            font-size: 9px;
            letter-spacing: 0.06em;
            fill: var(--outline);
        }

        .sch-core {
            fill: none;
            stroke: var(--primary);
            stroke-width: 1.4;
        }

        .sch-arrow {
            fill: none;
            stroke: var(--outline);
            stroke-width: 1;
        }

        .sch-arrow-in {
            fill: none;
            stroke: var(--secondary);
            stroke-width: 1.2;
        }

        .sch-blocked {
            fill: none;
            stroke: var(--outline);
            stroke-width: 1.2;
        }

        .sch-gate {
            fill: none;
            stroke: var(--primary);
            stroke-width: 2;
        }

        .sch-reject {
            fill: none;
            stroke: var(--outline);
            stroke-width: 1;
            stroke-dasharray: 4 4;
        }

        .figure-scroll {
            overflow-x: auto;
        }

        @media (max-width: 560px) {
            .figure-scroll {
                padding-bottom: 0.6rem;
                -webkit-overflow-scrolling: touch;
            }

            .approach-hero h1 {
                font-size: 2.4rem;
            }
        }        .figure-hint {
            display: none;
            margin-left: 0.5rem;
            color: var(--secondary);
        }

        @media (max-width: 560px) {
            .figure-hint {
                display: inline;
            }
        }        /* ── About: now line ─────────────────────────────────── */
        .about-now {
            font-size: 1rem !important;
            color: var(--on-surface-variant) !important;
            border-left: 1px solid var(--outline-variant);
            padding-left: 0.9rem;
            margin-top: 1.2rem !important;
        }

        .about-now-label {
            font-family: var(--font-mono);
            font-size: 0.6rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--secondary);
            margin-right: 0.5rem;
        }

        /* ── Approach: responsive figures ────────────────────── */
        .fig-mobile {
            display: none;
        }

        .seq {
            animation: blockPulse 7s ease-in-out infinite;
            animation-delay: var(--d, 0s);
        }

        .seq-arrow {
            animation: arrowPulse 7s ease-in-out infinite;
            animation-delay: var(--d, 0s);
        }

        @keyframes blockPulse {
            0%, 4% { stroke: var(--outline-variant); }
            9%, 20% { stroke: var(--secondary); }
            26%, 100% { stroke: var(--outline-variant); }
        }

        @keyframes arrowPulse {
            0%, 4% { stroke: var(--outline); }
            9%, 20% { stroke: var(--secondary); }
            26%, 100% { stroke: var(--outline); }
        }

        @media (max-width: 560px) {
            .fig-desktop {
                display: none;
            }
            .fig-mobile {
                display: block;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .seq,
            .seq-arrow {
                animation: none;
            }
        }        /* ── Figure 02: dependencies flowing inward ──────────── */
        .sch-arrow-in.flow,
        .sch-reject.flow {
            stroke-dasharray: 4 6;
            animation: dashFlow 2.4s linear infinite;
        }

        .sc-pulse {
            fill: var(--secondary);
        }

        @keyframes dashFlow {
            to {
                stroke-dashoffset: -20;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .sch-arrow-in.flow {
                animation: none;
            }
        }        .schematic-compact .sc-title {
            margin: 0 0 0.5rem;
            padding-bottom: 0.4rem;
            border-bottom: 1px solid var(--outline-variant);
            font-family: var(--font-mono);
            font-size: 0.5rem;
            letter-spacing: 0.28em;
            text-align: center;
            color: var(--outline);
        }        /* ── Translator: full vertical version for mobile ────── */
        .translator-mobile {
            display: none;
        }

        @media (max-width: 560px) {
            .translator-mobile {
                display: block;
            }
        }