        .timeline-head {
            margin-bottom: 26px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
        }

        .timeline-head h2 {
            margin-bottom: 0;
        }

        .timeline-filter {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            color: var(--muted);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 11.5px;
        }

        .timeline-filter-label {
            color: var(--faint);
        }

        .filter-chip {
            border: 1px solid var(--border);
            background: var(--bg-soft);
            color: var(--text-2);
            border-radius: 999px;
            padding: 6px 13px;
            cursor: pointer;
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 13px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            line-height: 1;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            box-shadow: var(--shadow-sm);
            transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
        }

        .filter-chip:hover {
            border-color: var(--accent-border);
            color: var(--text);
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }

        .filter-chip.is-active {
            border-color: var(--accent-border);
            background: var(--accent-soft);
            color: var(--accent);
            box-shadow: 0 2px 10px var(--accent-soft);
        }

        .filter-count {
            color: var(--faint);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 10.5px;
            font-weight: 500;
        }

        .filter-chip.is-active .filter-count {
            color: var(--accent);
        }

        .hero {
            position: relative;
            padding: 72px 0 60px;
            display: grid;
            grid-template-columns: 1.45fr 1fr;
            gap: 52px;
            align-items: start;
        }

        /* Hero Data Flow & AI Security Conduit Animation */
        .hero-conduit-svg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
            overflow: visible;
        }

        .conduit-track-bg {
            fill: none;
            stroke: rgba(59, 130, 246, 0.42);
            stroke-width: 1.5;
            stroke-linecap: round;
            stroke-linejoin: round;
            transition: stroke 0.3s ease;
        }

        :is(html.light, body.light) .conduit-track-bg {
            stroke: rgba(37, 99, 235, 0.35);
        }

        .conduit-origin-node {
            stroke: rgba(239, 68, 68, 0.55);
            transition: stroke 0.3s ease;
        }

        :is(html.light, body.light) .conduit-origin-node {
            stroke: rgba(220, 38, 38, 0.5);
        }

        .conduit-ball-group {
            will-change: transform;
            pointer-events: none;
        }

        .conduit-dot-anchor {
            display: inline-block;
            width: 8px;
            height: 12px;
            vertical-align: middle;
            pointer-events: none;
        }

        .conduit-ai-anchor {
            display: inline;
            transition: text-shadow 0.35s ease, filter 0.35s ease;
        }

        .conduit-ai-active {
            text-shadow: 0 0 16px rgba(59, 130, 246, 0.95), 0 0 32px rgba(59, 130, 246, 0.6) !important;
        }

        :is(html.light, body.light) .conduit-ai-active {
            text-shadow: 0 0 14px rgba(37, 99, 235, 0.7), 0 0 28px rgba(37, 99, 235, 0.4) !important;
        }

        .now-card {
            transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 220ms ease;
        }

        .now-card.conduit-impacted {
            border-color: rgba(59, 130, 246, 0.85) !important;
            box-shadow: -6px 0 24px -2px rgba(59, 130, 246, 0.55), var(--shadow-md) !important;
        }

        :is(html.light, body.light) .now-card.conduit-impacted {
            border-color: rgba(37, 99, 235, 0.85) !important;
            box-shadow: -6px 0 24px -2px rgba(37, 99, 235, 0.45), var(--shadow-md) !important;
        }

        .btn-primary.conduit-impacted {
            box-shadow: 0 0 26px 4px rgba(59, 130, 246, 0.75), 0 2px 14px rgba(59, 130, 246, 0.9) !important;
            filter: brightness(1.18);
            transform: translateY(-1px);
        }

        :is(html.light, body.light) .btn-primary.conduit-impacted {
            box-shadow: 0 0 24px 3px rgba(37, 99, 235, 0.65), 0 2px 14px rgba(37, 99, 235, 0.75) !important;
            filter: brightness(1.12);
            transform: translateY(-1px);
        }

        .conduit-ripple {
            fill: none;
            stroke: #3b82f6;
            stroke-width: 2px;
            opacity: 0;
            transform-box: fill-box;
            transform-origin: center;
            will-change: transform, opacity;
        }

        :is(html.light, body.light) .conduit-ripple {
            stroke: #2563eb;
        }

        .conduit-ripple.active {
            animation: conduitRippleAnim 0.75s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
        }

        @keyframes conduitRippleAnim {
        0% {
            transform: scale(0.08);
            opacity: 0.95;
        }
        100% {
            transform: scale(1);
            opacity: 0;
        }
    }

        .conduit-spark {
            fill: #60a5fa;
            opacity: 0;
        }

        :is(html.light, body.light) .conduit-spark {
            fill: #2563eb;
        }

        .conduit-spark.active {
            animation: conduitSparkAnim 0.65s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
        }

        @keyframes conduitSparkAnim {
            0% {
                transform: translate(0, 0) scale(1);
                opacity: 1;
            }
            100% {
                transform: var(--spark-target) scale(0);
                opacity: 0;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .conduit-ball-group,
            .conduit-ripple,
            .conduit-spark {
                display: none !important;
            }
        }

        .hero-main {
            display: flex;
            flex-direction: column;
            position: relative;
            z-index: 2;
        }

        .hero-kicker {
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 11.5px;
            letter-spacing: 0.8px;
            text-transform: uppercase;
            color: var(--accent);
            font-weight: 600;
            margin-bottom: 14px;
        }

        .hero-title {
            margin-bottom: 20px;
            font-size: 46px;
            line-height: 1.1;
            font-weight: 600;
            letter-spacing: -1.2px;
            color: var(--text);
            text-wrap: balance;
        }

        .hero-title .accent {
            color: var(--accent);
        }

        .hero-bio {
            margin-bottom: 26px;
            max-width: 560px;
            font-size: 16px;
            line-height: 1.65;
            color: var(--text-2);
            position: relative;
            z-index: 2;
        }

        .hero-bio strong {
            color: var(--text);
            font-weight: 600;
        }

        .hero-actions {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 26px;
            position: relative;
            z-index: 2;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            border-radius: 8px;
            padding: 12px 18px;
            font-size: 14px;
            font-weight: 500;
            border: 1px solid transparent;
            cursor: pointer;
            line-height: 1;
            transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease, filter 160ms ease;
        }

        .btn-icon {
            flex-shrink: 0;
            transition: transform 160ms ease;
        }

        .btn-primary:hover .btn-icon {
            transform: translate(2px, -2px);
        }

        .btn-primary {
            background: var(--accent);
            color: var(--bg);
            box-shadow: 0 2px 10px oklch(0.65 0.14 250 / 0.35);
        }

        .btn-primary:hover {
            background: oklch(0.70 0.15 250);
            box-shadow: 0 4px 18px oklch(0.65 0.14 250 / 0.5);
            transform: translateY(-1px);
        }

        :is(html.light, body.light) .btn-primary {
            color: #ffffff;
            box-shadow: 0 2px 10px oklch(0.52 0.16 250 / 0.3);
        }

        :is(html.light, body.light) .btn-primary:hover {
            background: oklch(0.46 0.17 250);
            box-shadow: 0 4px 18px oklch(0.52 0.16 250 / 0.45);
        }

        .btn-secondary {
            border-color: var(--border);
            background: var(--bg-card);
            color: var(--text);
            box-shadow: var(--shadow-sm);
        }

        .btn-secondary:hover {
            border-color: var(--accent-border);
            background: var(--bg-soft);
            box-shadow: var(--shadow-md);
            transform: translateY(-1px);
        }

        .hero-social {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .social-icon-btn {
            width: 38px;
            height: 38px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: var(--bg-card);
            color: var(--text-2);
            box-shadow: var(--shadow-sm);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
        }

        .social-icon-btn:hover {
            color: var(--accent);
            border-color: var(--accent-border);
            background: var(--bg-soft);
            box-shadow: var(--shadow-md);
            transform: translateY(-1px);
        }

        .hero-highlights {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .hero-chip {
            border: 1px solid var(--border);
            border-radius: 999px;
            padding: 5px 12px;
            color: var(--text-2);
            font-size: 12px;
            background: var(--bg-soft);
            box-shadow: var(--shadow-sm);
            display: inline-flex;
            align-items: center;
            gap: 7px;
            transition: border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
        }

        .hero-chip:hover {
            border-color: var(--accent-border);
            color: var(--text);
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }

        .chip-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--accent);
        }

        .now-card {
            border: 1px solid var(--border);
            border-radius: 12px;
            background: var(--bg-card);
            padding: 22px;
            box-shadow: var(--shadow-md);
            transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
        }

        .now-card:hover {
            border-color: var(--accent-border);
            box-shadow: var(--shadow-lg);
            transform: translateY(-2px);
        }

        .now-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 15px;
            color: var(--text-2);
            font-size: 12px;
            font-weight: 500;
        }

        .now-header span:last-child {
            color: var(--faint);
        }

        .now-row {
            display: grid;
            grid-template-columns: 72px 1fr;
            gap: 12px;
            padding: 9px 0;
            border-top: 1px solid var(--border-soft);
        }

        .now-row:first-of-type {
            border-top: none;
        }

        .now-key {
            color: var(--faint);
            font-size: 12px;
        }

        .now-value {
            color: var(--text);
            font-size: 13px;
            line-height: 1.4;
        }

        .section {
            padding: 36px 0 56px;
            border-top: 1px solid var(--border-soft);
        }

        .section-kicker {
            margin-bottom: 6px;
            color: var(--accent);
            font-size: 12px;
            font-weight: 500;
        }

        .section h2 {
            margin-bottom: 30px;
            font-size: 28px;
            line-height: 1.2;
            letter-spacing: -0.5px;
            color: var(--text);
        }

        .section-link {
            display: inline-flex;
            margin-top: -12px;
            margin-bottom: 22px;
            color: var(--accent);
            font-size: 13px;
            border-bottom: 1px solid transparent;
        }

        .section-link:hover {
            border-bottom-color: var(--accent-border);
        }

        .timeline-event {
            display: grid;
            grid-template-columns: 175px 48px 1fr;
            position: relative;
            transition: opacity 200ms ease;
        }

        .timeline-event-inner {
            display: contents;
        }

        .timeline-date {
            padding-right: 18px;
            padding-top: 13px;
            text-align: right;
            white-space: nowrap;
            color: var(--muted);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 11.5px;
            font-weight: 500;
            transition: color 200ms ease;
        }

        .timeline-event:hover .timeline-date {
            color: var(--text-2);
        }

        .timeline-spine {
            position: relative;
        }

        .timeline-spine::before {
            content: "";
            position: absolute;
            left: 23px;
            top: 0;
            bottom: 0;
            width: 1px;
            background: var(--border);
            z-index: 1;
        }

        .timeline-event:first-child .timeline-spine::before,
        .timeline-event.first-visible .timeline-spine::before {
            top: 23px;
        }

        .timeline-event:last-child .timeline-spine::before,
        .timeline-event.last-visible .timeline-spine::before {
            bottom: calc(100% - 23px);
        }

        .timeline-event.is-hidden {
            display: none;
            opacity: 0;
        }

        .timeline-dot {
            position: absolute;
            left: 13px;
            top: 12px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            border: 1.5px solid var(--border);
            background: var(--bg);
            color: var(--muted);
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 10px;
            font-weight: 600;
            z-index: 2;
            transition: border-color 200ms ease, color 200ms ease;
        }

        .timeline-dot.work {
            letter-spacing: 0.2px;
        }

        .timeline-dot.edu {
            letter-spacing: 0.2px;
        }

        .timeline-dot.current {
            border-color: var(--accent);
            color: var(--accent);
            box-shadow: 0 0 0 4px var(--accent-soft);
        }

        .timeline-body {
            padding: 10px 0 24px 18px;
            transition: color 200ms ease, transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
        }

        .timeline-event:hover .timeline-body {
            transform: translateX(4px);
        }

        .timeline-event:hover .timeline-title {
            color: var(--accent);
        }

        .timeline-title {
            display: inline-flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
            margin-bottom: 4px;
            color: var(--text);
            font-size: 15px;
            font-weight: 500;
            transition: color 200ms ease;
        }

        .timeline-org {
            margin-bottom: 6px;
            color: var(--text-2);
            font-size: 13px;
            transition: color 200ms ease;
        }

        .timeline-event:hover .timeline-org {
            color: var(--text);
        }

        .timeline-blurb {
            max-width: 600px;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.55;
        }

        .now-badge {
            border: 1px solid var(--accent-border);
            border-radius: 4px;
            background: var(--accent-soft);
            color: var(--accent);
            padding: 2px 7px;
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 9.5px;
            font-weight: 600;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        /* --- Desk Reading Lamp & Writing Section Illumination --- */
        #writing.section {
            position: relative;
        }

        .writing-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: relative;
            margin-bottom: 24px;
            gap: 20px;
        }

        .writing-head-info {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
        }

        .writing-head-info h2 {
            margin-bottom: 0;
            line-height: 1;
        }

        .writing-blog-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            height: 28px;
            padding: 0 11px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: var(--bg-card);
            color: var(--text);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 12px;
            font-weight: 500;
            line-height: 1;
            text-decoration: none;
            box-shadow: var(--shadow-sm);
            cursor: pointer;
            white-space: nowrap;
            transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
        }

        .writing-blog-btn:hover {
            border-color: var(--accent-border);
            background: var(--bg-soft);
            color: var(--text);
            box-shadow: var(--shadow-md);
            transform: translateY(-1px);
        }

        .writing-blog-btn .btn-icon {
            flex-shrink: 0;
            transition: transform 160ms ease;
        }

        .writing-blog-btn:hover .btn-icon {
            transform: translateX(2px);
        }

        #writing.is-lit .writing-blog-btn {
            border-color: oklch(0.8 0.08 80 / 0.28);
            background: linear-gradient(160deg, oklch(0.22 0.015 75) 0%, var(--bg-card) 100%);
            box-shadow: 0 3px 12px -2px oklch(0.85 0.12 80 / 0.12), var(--shadow-sm);
        }

        #writing.is-lit .writing-blog-btn:hover {
            border-color: #f59e0b;
            box-shadow: 0 6px 18px -2px oklch(0.85 0.15 80 / 0.22), var(--shadow-md);
            color: #fbbf24;
            transform: translateY(-1.5px);
        }

        :is(html.light, body.light) #writing.is-lit .writing-blog-btn {
            border-color: oklch(0.78 0.08 75 / 0.32);
            background: linear-gradient(160deg, #fffdf8 0%, var(--bg-card) 100%);
            box-shadow: 0 3px 12px -2px oklch(0.85 0.10 75 / 0.14), var(--shadow-sm);
        }

        :is(html.light, body.light) #writing.is-lit .writing-blog-btn:hover {
            border-color: #d97706;
            color: #b45309;
        }

        .writing-lamp-fixture {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            align-self: flex-start;
            user-select: none;
            z-index: 5;
            margin-top: 0;
            margin-bottom: -2px;
        }

        .writing-lamp-btn {
            background: transparent;
            border: none;
            padding: 0;
            cursor: pointer;
            position: relative;
            display: block;
            outline: none;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .writing-lamp-btn:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 4px;
            border-radius: 8px;
        }

        .writing-lamp-svg {
            display: block;
            overflow: visible;
            transition: filter 350ms ease;
        }

        .lamp-ceiling-wire {
            stroke: var(--faint);
        }

        .lamp-mount-cap {
            fill: var(--border);
        }

        .lamp-socket-base {
            fill: #b45309;
        }

        .shade-stop-1 {
            stop-color: #242c38;
        }

        .shade-stop-2 {
            stop-color: #121822;
        }

        :is(html.light, body.light) .shade-stop-1 {
            stop-color: #64748b;
        }

        :is(html.light, body.light) .shade-stop-2 {
            stop-color: #334155;
        }

        .lamp-reflector {
            fill: url(#lampReflectorOff);
            transition: fill 350ms ease;
        }

        .lamp-bulb {
            fill: #475569;
            opacity: 0.6;
            transition: fill 350ms ease, opacity 350ms ease, filter 350ms ease;
        }

        .lamp-filament {
            fill: #64748b;
            opacity: 0.4;
            transition: fill 350ms ease, opacity 350ms ease;
        }

        .lamp-light-beam {
            opacity: 0;
            pointer-events: none;
            transition: opacity 350ms cubic-bezier(0.16, 1, 0.3, 1);
        }

        .lamp-rim-trim {
            stroke: #b45309;
            transition: stroke 350ms ease, filter 350ms ease;
        }

        .pull-eyelet {
            fill: #b45309;
        }

        .pull-bracket {
            stroke: #b45309;
        }

        .pull-chain-beads {
            stroke: #94a3b8;
        }

        .pull-knob {
            fill: #d97706;
            transition: fill 200ms ease;
        }

        .pull-knob-tip {
            fill: #92400e;
            transition: fill 200ms ease;
        }

        /* Pull Switch Physics & Mechanical Lever Action */
        .lamp-pull-cord {
            cursor: pointer;
        }

        .lamp-lever-arm {
            transform-origin: 123px 27.5px;
            transition: transform 180ms ease;
        }

        .lamp-chain-pull {
            transform-origin: 133.5px 27.5px;
            transition: transform 180ms ease;
        }

        .lamp-pull-cord:hover .lamp-lever-arm {
            transform: rotate(3.5deg);
        }

        .lamp-pull-cord:hover .lamp-chain-pull {
            animation: cord-sway 1.6s ease-in-out infinite alternate;
        }

        @keyframes cord-sway {
            0% { transform: rotate(-2.5deg); }
            100% { transform: rotate(2.5deg); }
        }

        .lamp-pull-cord.is-pulling .lamp-lever-arm {
            animation: lever-dip 520ms cubic-bezier(0.2, 1, 0.35, 1) forwards !important;
        }

        .lamp-pull-cord.is-pulling .lamp-chain-pull {
            animation: cord-pull 520ms cubic-bezier(0.2, 1, 0.35, 1) forwards !important;
        }

        @keyframes lever-dip {
            0% { transform: rotate(0deg); }
            30% { transform: rotate(25deg); }
            52% { transform: rotate(-5deg); }
            72% { transform: rotate(8deg); }
            88% { transform: rotate(-2deg); }
            100% { transform: rotate(0deg); }
        }

        @keyframes cord-pull {
            0% { transform: translateY(0); }
            30% { transform: translateY(4.6px); }
            52% { transform: translateY(-0.8px); }
            72% { transform: translateY(1.4px); }
            88% { transform: translateY(-0.3px); }
            100% { transform: translateY(0); }
        }

        /* Night-only lamp tooltip */
        .lamp-night-tooltip {
            position: absolute;
            top: calc(100% + 10px);
            right: 0;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            background: var(--bg-card);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--border);
            border-radius: 8px;
            box-shadow: var(--shadow-md);
            color: var(--text);
            font-size: 12.5px;
            white-space: nowrap;
            pointer-events: none;
            opacity: 0;
            transform: translateY(-4px) scale(0.98);
            transition: opacity 180ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 25;
        }

        .lamp-night-tooltip::before {
            content: "";
            position: absolute;
            bottom: 100%;
            right: 26px;
            width: 8px;
            height: 8px;
            background: var(--bg-card);
            border-left: 1px solid var(--border);
            border-top: 1px solid var(--border);
            transform: translateY(5px) rotate(45deg);
        }

        .lamp-night-tooltip.is-visible {
            opacity: 1;
            transform: translateY(0) scale(1);
            pointer-events: auto;
        }

        .lamp-night-icon {
            color: var(--accent);
            flex-shrink: 0;
            display: block;
        }

        .lamp-night-text {
            color: var(--text-2);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 12px;
            font-weight: 450;
            letter-spacing: -0.01em;
        }

        .lamp-night-switch-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: var(--bg-soft);
            border: 1px solid var(--border-soft);
            border-radius: 6px;
            padding: 4px 10px;
            color: var(--text);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 11.5px;
            font-weight: 500;
            letter-spacing: -0.01em;
            cursor: pointer;
            line-height: 1.2;
            white-space: nowrap;
            transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
        }

        .lamp-night-switch-btn:hover {
            background: var(--bg-card);
            border-color: var(--accent-border);
            color: var(--accent);
            box-shadow: var(--shadow-sm);
            transform: translateY(-0.5px);
        }

        .lamp-night-switch-btn:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

        /* Ambient Spotlight Cone Layer - Slowly fading into darkness in all directions (including right side) */
        .writing-spotlight-layer {
            position: absolute;
            inset: -320px -380px -120px -120px;
            pointer-events: none;
            background: radial-gradient(
                ellipse 640px 460px at calc(100% - 480px) 390px,
                oklch(0.92 0.16 80 / 0.18) 0%,
                oklch(0.90 0.15 78 / 0.12) 20%,
                oklch(0.88 0.12 75 / 0.06) 42%,
                oklch(0.85 0.08 75 / 0.02) 65%,
                transparent 80%
            );
            -webkit-mask-image:
                radial-gradient(ellipse 600px 430px at calc(100% - 480px) 390px, black 15%, rgba(0, 0, 0, 0.65) 36%, rgba(0, 0, 0, 0.18) 58%, transparent 78%),
                linear-gradient(to left, transparent 0%, black 280px);
            mask-image:
                radial-gradient(ellipse 600px 430px at calc(100% - 480px) 390px, black 15%, rgba(0, 0, 0, 0.65) 36%, rgba(0, 0, 0, 0.18) 58%, transparent 78%),
                linear-gradient(to left, transparent 0%, black 280px);
            -webkit-mask-composite: source-in;
            mask-composite: intersect;
            opacity: 0;
            transition: opacity 450ms cubic-bezier(0.16, 1, 0.3, 1);
            mix-blend-mode: screen;
            z-index: 2;
        }

        /* --- WHEN THE READING LAMP IS ON (NIGHT / DARK MODE ONLY) --- */
        #writing.is-lit .writing-lamp-svg {
            filter: drop-shadow(0 6px 24px oklch(0.88 0.16 80 / 0.45));
        }

        #writing.is-lit .lamp-reflector {
            fill: url(#lampReflectorLit);
        }

        #writing.is-lit .lamp-bulb {
            fill: #ffffff;
            opacity: 1;
            filter: url(#bulbGlow);
        }

        #writing.is-lit .lamp-filament {
            fill: #fef08a;
            opacity: 1;
        }

        #writing.is-lit .lamp-light-beam {
            opacity: 1;
        }

        #writing.is-lit .lamp-rim-trim {
            stroke: #fbbf24;
            filter: drop-shadow(0 0 4px #f59e0b);
        }

        #writing.is-lit .pull-knob {
            fill: #f59e0b;
        }

        #writing.is-lit .writing-spotlight-layer {
            opacity: 1;
        }

        #writing.is-lit .writing-spotlight-layer {
            opacity: 1;
        }

        /* Illumination on Featured Article */
        #writing.is-lit .writing-featured {
            border-color: oklch(0.82 0.14 80 / 0.45);
            box-shadow: 0 16px 36px -4px oklch(0.85 0.14 80 / 0.22), 0 0 24px -2px oklch(0.85 0.14 80 / 0.15), var(--shadow-md);
            background: linear-gradient(135deg, oklch(0.24 0.02 75) 0%, var(--bg-soft) 100%);
        }

        :is(html.light, body.light) #writing.is-lit .writing-featured {
            border-color: oklch(0.75 0.12 75 / 0.4);
            box-shadow: 0 16px 36px -4px oklch(0.85 0.12 75 / 0.2), 0 0 20px -2px oklch(0.85 0.12 75 / 0.12), var(--shadow-md);
            background: linear-gradient(135deg, #fffcf5 0%, var(--bg-soft) 100%);
        }

        #writing.is-lit .writing-tag {
            color: #f59e0b;
            text-shadow: 0 0 10px oklch(0.85 0.15 80 / 0.35);
        }

        #writing.is-lit .writing-featured:hover {
            border-color: #fbbf24;
            box-shadow: 0 20px 42px -4px oklch(0.85 0.16 80 / 0.3), 0 0 30px oklch(0.85 0.14 80 / 0.2);
            transform: translateY(-3px);
        }

        #writing.is-lit .writing-featured:hover h3 {
            color: #fbbf24;
        }

        #writing.is-lit .writing-preview img {
            filter: brightness(1.04) contrast(1.02) saturate(1.06);
            box-shadow: 0 4px 20px -2px oklch(0.85 0.14 80 / 0.3);
        }

        /* Illumination on Grid Articles */
        #writing.is-lit .writing-card {
            border-color: oklch(0.8 0.08 80 / 0.28);
            box-shadow: 0 6px 20px -2px oklch(0.85 0.12 80 / 0.12), var(--shadow-sm);
            background: linear-gradient(160deg, oklch(0.22 0.015 75) 0%, var(--bg-card) 100%);
        }

        :is(html.light, body.light) #writing.is-lit .writing-card {
            border-color: oklch(0.78 0.08 75 / 0.32);
            box-shadow: 0 6px 20px -2px oklch(0.85 0.10 75 / 0.14), var(--shadow-sm);
            background: linear-gradient(160deg, #fffdf8 0%, var(--bg-card) 100%);
        }

        #writing.is-lit .writing-card-top span:first-child,
        #writing.is-lit .pub-badge {
            color: #f59e0b;
        }

        #writing.is-lit .writing-card:hover {
            border-color: #f59e0b;
            box-shadow: 0 12px 28px -4px oklch(0.85 0.15 80 / 0.24), var(--shadow-md);
            transform: translateY(-3px);
        }

        #writing.is-lit .writing-card:hover .writing-card-title {
            color: #fbbf24;
        }

        .writing-featured {
            display: grid;
            grid-template-columns: 1fr 1fr;
            border: 1px solid var(--border);
            border-radius: 8px;
            overflow: hidden;
            background: var(--bg-soft);
            margin-bottom: 16px;
            box-shadow: var(--shadow-md);
            transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease, box-shadow 220ms ease;
        }

        .writing-featured:hover {
            transform: translateY(-3px);
            border-color: var(--accent-border);
            box-shadow: var(--shadow-lg);
        }

        .writing-featured-content {
            padding: 28px;
        }

        .writing-tag {
            margin-bottom: 12px;
            color: var(--accent);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.6px;
            text-transform: uppercase;
        }

        .writing-featured h3 {
            margin-bottom: 12px;
            color: var(--text);
            font-size: 22px;
            line-height: 1.26;
            transition: color 200ms ease;
        }

        .writing-featured:hover h3 {
            color: var(--accent);
        }

        .writing-featured p {
            margin-bottom: 18px;
            color: var(--muted);
            font-size: 13.5px;
            line-height: 1.6;
        }

        .writing-meta {
            color: var(--faint);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 12px;
            font-weight: 450;
        }

        .writing-preview {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 220px;
            padding: 12px;
            background: var(--bg-soft);
            border-left: 1px solid var(--border-soft);
            overflow: hidden;
        }

        .writing-preview img {
            width: 100%;
            height: 100%;
            min-height: 200px;
            object-fit: cover;
            border-radius: 8px;
            box-shadow: var(--shadow-sm);
            transition: transform 300ms ease, filter 300ms ease;
        }

        .writing-featured:hover .writing-preview img {
            transform: scale(1.03);
        }

        .writing-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 14px;
        }

        .writing-card {
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-card);
            padding: 20px;
            display: flex;
            flex-direction: column;
            min-height: 160px;
            box-shadow: var(--shadow-sm);
            text-decoration: none;
            transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease, box-shadow 220ms ease;
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        .writing-card:hover {
            transform: translateY(-3px);
            border-color: var(--accent-border);
            box-shadow: var(--shadow-lg);
        }

        .writing-card:hover .writing-card-title {
            color: var(--accent);
        }

        .writing-card-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 11px;
            letter-spacing: 0.4px;
        }

        .writing-card-date {
            color: var(--faint);
            font-weight: 450;
            font-size: 11px;
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
        }

        .writing-card-title {
            color: var(--text);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 14.5px;
            line-height: 1.4;
            font-weight: 500;
            letter-spacing: -0.012em;
            transition: color 200ms ease;
        }

        .writing-card-desc {
            color: var(--muted);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 13px;
            line-height: 1.55;
            letter-spacing: -0.006em;
            margin-top: 8px;
        }

        /* Publisher Sources:
           Octoparse: brand blue (#3b82f6 / #2563eb)
           Chat4Data: slate grey + orange 4Data
           Medium: pure black / white
        */
        .pub-badge {
            display: inline-flex;
            align-items: center;
            padding: 0;
            background: none;
            border: none;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            line-height: 1.2;
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
        }

        .pub-badge.pub-octoparse,
        .writing-card .pub-badge.pub-octoparse,
        #writing:not(.is-lit) .writing-card[data-publisher="octoparse"] .pub-badge.pub-octoparse {
            color: #3b82f6;
            background: none;
            border: none;
        }
        :is(html.light, body.light) .pub-badge.pub-octoparse,
        :is(html.light, body.light) .writing-card .pub-badge.pub-octoparse,
        :is(html.light, body.light) #writing:not(.is-lit) .writing-card[data-publisher="octoparse"] .pub-badge.pub-octoparse {
            color: #2563eb;
        }

        .pub-badge.pub-chat4data {
            color: #94a3b8;
            background: none;
            border: none;
        }
        :is(html.light, body.light) .pub-badge.pub-chat4data {
            color: #64748b;
        }

        .pub-badge.pub-chat4data .pub-accent {
            color: #fb923c;
            transition: color 200ms ease;
        }
        :is(html.light, body.light) .pub-badge.pub-chat4data .pub-accent {
            color: #ea580c;
        }

        .pub-badge.pub-medium {
            color: var(--text-2);
            background: none;
            border: none;
        }
        :is(html.light, body.light) .pub-badge.pub-medium {
            color: #18181b;
        }

        .pub-tag-sep {
            color: var(--border);
            font-size: 10px;
            margin: 0 6px;
        }

        /* Publisher-specific Card Hover States (Octoparse blue, Chat4Data orange, Medium ink/white) */
        #writing:not(.is-lit) .writing-card[data-publisher="octoparse"]:hover {
            border-color: rgba(59, 130, 246, 0.45);
            box-shadow: 0 14px 34px -4px rgba(59, 130, 246, 0.16), var(--shadow-md);
        }
        #writing:not(.is-lit) .writing-card[data-publisher="octoparse"]:hover .writing-card-title {
            color: #3b82f6;
        }
        :is(html.light, body.light) #writing:not(.is-lit) .writing-card[data-publisher="octoparse"]:hover {
            border-color: rgba(37, 99, 235, 0.35);
            box-shadow: 0 14px 34px -4px rgba(37, 99, 235, 0.12), var(--shadow-md);
        }
        :is(html.light, body.light) #writing:not(.is-lit) .writing-card[data-publisher="octoparse"]:hover .writing-card-title {
            color: #2563eb;
        }

        #writing:not(.is-lit) .writing-card[data-publisher="chat4data"]:hover {
            border-color: rgba(251, 146, 60, 0.45);
            box-shadow: 0 14px 34px -4px rgba(251, 146, 60, 0.16), var(--shadow-md);
        }
        #writing:not(.is-lit) .writing-card[data-publisher="chat4data"]:hover .writing-card-title {
            color: #fb923c;
        }
        :is(html.light, body.light) #writing:not(.is-lit) .writing-card[data-publisher="chat4data"]:hover {
            border-color: rgba(234, 88, 12, 0.35);
            box-shadow: 0 14px 34px -4px rgba(234, 88, 12, 0.12), var(--shadow-md);
        }
        :is(html.light, body.light) #writing:not(.is-lit) .writing-card[data-publisher="chat4data"]:hover .writing-card-title {
            color: #ea580c;
        }

        #writing:not(.is-lit) .writing-card[data-publisher="medium"]:hover {
            border-color: rgba(255, 255, 255, 0.4);
            box-shadow: 0 14px 34px -4px rgba(255, 255, 255, 0.08), var(--shadow-md);
        }
        #writing:not(.is-lit) .writing-card[data-publisher="medium"]:hover .writing-card-title {
            color: #ffffff;
        }
        :is(html.light, body.light) #writing:not(.is-lit) .writing-card[data-publisher="medium"]:hover {
            border-color: rgba(24, 24, 27, 0.45);
            box-shadow: 0 14px 34px -4px rgba(24, 24, 27, 0.1), var(--shadow-md);
        }
        :is(html.light, body.light) #writing:not(.is-lit) .writing-card[data-publisher="medium"]:hover .writing-card-title {
            color: #09090b;
        }

        .writing-more {
            display: flex;
            justify-content: center;
            margin-top: 26px;
        }

        .writing-more-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 184px;
            height: 38px;
            padding: 0 16px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: var(--bg-card);
            color: var(--text);
            font-size: 13.5px;
            font-weight: 500;
            line-height: 1;
            text-decoration: none;
            box-shadow: var(--shadow-sm);
            cursor: pointer;
            transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
        }

        .writing-more-btn:hover {
            border-color: var(--accent-border);
            background: var(--bg-soft);
            color: var(--text);
            box-shadow: var(--shadow-md);
            transform: translateY(-1px);
        }

        .writing-more-btn .btn-icon {
            flex-shrink: 0;
            transition: transform 160ms ease;
        }

        .writing-more-btn:hover .btn-icon {
            transform: translateX(2.5px);
        }

        #writing.is-lit .writing-more-btn {
            border-color: oklch(0.8 0.08 80 / 0.28);
            background: linear-gradient(160deg, oklch(0.22 0.015 75) 0%, var(--bg-card) 100%);
            box-shadow: 0 4px 14px -2px oklch(0.85 0.12 80 / 0.12), var(--shadow-sm);
        }

        #writing.is-lit .writing-more-btn:hover {
            border-color: #f59e0b;
            box-shadow: 0 8px 22px -2px oklch(0.85 0.15 80 / 0.22), var(--shadow-md);
            color: #fbbf24;
            transform: translateY(-2px);
        }

        :is(html.light, body.light) #writing.is-lit .writing-more-btn {
            border-color: oklch(0.78 0.08 75 / 0.32);
            background: linear-gradient(160deg, #fffdf8 0%, var(--bg-card) 100%);
            box-shadow: 0 4px 14px -2px oklch(0.85 0.10 75 / 0.14), var(--shadow-sm);
        }

        :is(html.light, body.light) #writing.is-lit .writing-more-btn:hover {
            border-color: #d97706;
            color: #b45309;
        }

        .projects-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 14px;
        }

        .project-card {
            position: relative;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-card);
            padding: 20px;
            display: flex;
            flex-direction: column;
            min-height: 180px;
            box-shadow: var(--shadow-sm);
            transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease, box-shadow 220ms ease;
        }

        .project-card:hover {
            transform: translateY(-3px);
            border-color: var(--accent-border);
            box-shadow: var(--shadow-lg);
        }

        .project-card:hover .project-title {
            color: var(--accent);
        }

        .project-card-logo {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0.85;
            transition: transform 220ms ease, opacity 220ms ease;
            pointer-events: none;
        }

        .project-card:hover .project-card-logo {
            opacity: 1;
            transform: scale(1.08);
        }

        .project-card-logo.octoparse-logo {
            color: #3b82f6;
        }

        :is(html.light, body.light) .project-card-logo.octoparse-logo {
            color: #2563eb;
        }

        .project-card-logo.chat4data-logo {
            color: var(--text);
        }

        /* CV Object Tracking Card Feature */
        .project-card-cv {
            position: relative;
            overflow: hidden;
        }

        .project-card-content {
            position: relative;
            z-index: 2;
            display: flex;
            flex-direction: column;
            height: 100%;
            pointer-events: none;
        }

        .project-card-cv .project-repo,
        .project-card-cv .project-title,
        .project-card-cv .project-blurb {
            text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.6);
        }

        :is(html.light, body.light) .project-card-cv .project-repo,
        :is(html.light, body.light) .project-card-cv .project-title,
        :is(html.light, body.light) .project-card-cv .project-blurb {
            text-shadow: 0 1px 4px rgba(255, 255, 255, 0.95), 0 0 2px rgba(255, 255, 255, 0.8);
        }

        .cv-road-canvas {
            position: absolute;
            inset: 0;
            z-index: 1;
            pointer-events: none;
            overflow: hidden;
            border-radius: inherit;
            container-type: inline-size;
            background: linear-gradient(
                180deg,
                rgba(11, 16, 26, 0.45) 0%,
                rgba(15, 23, 42, 0.72) 48%,
                rgba(11, 16, 26, 0.55) 100%
            );
            opacity: 0.85;
            transition: opacity 250ms ease;
        }

        .project-card-cv:hover .cv-road-canvas {
            opacity: 1;
        }

        .cv-road-divider {
            position: absolute;
            left: 0;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            height: 1px;
            background: repeating-linear-gradient(
                to right,
                rgba(245, 158, 11, 0.28) 0px,
                rgba(245, 158, 11, 0.28) 14px,
                transparent 14px,
                transparent 26px
            );
            z-index: 1;
        }

        .cv-lane {
            position: absolute;
            left: 0;
            right: 0;
            height: 44px;
            overflow: visible;
        }

        .cv-lane-top {
            bottom: 50%;
            margin-bottom: 4px;
        }

        .cv-lane-bottom {
            top: 50%;
            margin-top: 4px;
        }

        .cv-car-unit {
            position: absolute;
            top: 8px;
            left: 0;
            width: 70px;
            height: 28px;
            will-change: transform;
            opacity: 0.65;
            transition: opacity 250ms ease;
        }

        .project-card-cv:hover .cv-car-unit {
            opacity: 0.95;
        }

        .cv-car-unit.top-1 {
            animation: drive-left 8s linear infinite;
        }

        .cv-car-unit.top-2 {
            animation: drive-left 8s linear infinite;
            animation-delay: -4s;
        }

        .cv-car-unit.bottom-1 {
            animation: drive-right 9.2s linear infinite;
        }

        .cv-car-unit.bottom-2 {
        animation: drive-right 9.2s linear infinite;
        animation-delay: -4.6s;
    }

    .project-card-cv.anim-paused .cv-car-unit {
        animation-play-state: paused !important;
    }

    @keyframes drive-left {
        0% {
            transform: translate3d(450px, 0, 0);
            transform: translate3d(calc(100cqw + 70px), 0, 0);
        }
        100% {
            transform: translate3d(-110px, 0, 0);
        }
    }

        @keyframes drive-right {
            0% {
                transform: translate3d(-110px, 0, 0);
            }
            100% {
                transform: translate3d(450px, 0, 0);
                transform: translate3d(calc(100cqw + 70px), 0, 0);
            }
        }

        .cv-bbox {
            position: absolute;
            inset: -4px -5px;
            border: 1px solid rgba(16, 185, 129, 0.55);
            background: rgba(16, 185, 129, 0.04);
            border-radius: 2px;
            box-shadow: 0 0 6px rgba(16, 185, 129, 0.15);
            transition: border-color 200ms ease, box-shadow 200ms ease;
        }

        .project-card-cv:hover .cv-bbox {
            border-color: rgba(52, 211, 153, 0.95);
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
        }

        .cv-corner {
            position: absolute;
            width: 5px;
            height: 5px;
            border-color: #34d399;
            border-style: solid;
        }

        .cv-corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
        .cv-corner.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
        .cv-corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
        .cv-corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

        .cv-centroid {
            position: absolute;
            left: 50%;
            top: 50%;
            width: 9px;
            height: 9px;
            transform: translate(-50%, -50%);
        }

        .cv-centroid::before {
            content: "";
            position: absolute;
            top: 4px;
            left: 0;
            width: 9px;
            height: 1px;
            background: #34d399;
        }

        .cv-centroid::after {
            content: "";
            position: absolute;
            top: 0;
            left: 4px;
            width: 1px;
            height: 9px;
            background: #34d399;
        }

        .cv-centroid-dot {
            position: absolute;
            left: 50%;
            top: 50%;
            width: 3px;
            height: 3px;
            background: #fef08a;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            box-shadow: 0 0 4px #fef08a;
        }

        .cv-vector-arrow {
            position: absolute;
            top: 50%;
            height: 1px;
            background: #34d399;
        }

        .cv-car-unit.facing-left .cv-vector-arrow {
            right: 50%;
            width: 22px;
            margin-right: 5px;
        }

        .cv-car-unit.facing-left .cv-vector-arrow::after {
            content: "";
            position: absolute;
            left: 0;
            top: -2px;
            width: 0;
            height: 0;
            border-top: 2.5px solid transparent;
            border-bottom: 2.5px solid transparent;
            border-right: 5px solid #34d399;
        }

        .cv-car-unit.facing-right .cv-vector-arrow {
            left: 50%;
            width: 22px;
            margin-left: 5px;
        }

        .cv-car-unit.facing-right .cv-vector-arrow::after {
            content: "";
            position: absolute;
            right: 0;
            top: -2px;
            width: 0;
            height: 0;
            border-top: 2.5px solid transparent;
            border-bottom: 2.5px solid transparent;
            border-left: 5px solid #34d399;
        }

        .cv-tag {
            position: absolute;
            top: -14px;
            left: -1px;
            background: rgba(10, 15, 26, 0.95);
            border: 1px solid rgba(52, 211, 153, 0.7);
            color: #34d399;
            font-size: 7.5px;
            font-weight: 600;
            line-height: 1;
            padding: 1.5px 4px;
            border-radius: 2px;
            white-space: nowrap;
            letter-spacing: 0.4px;
            text-transform: uppercase;
        }

        .cv-car-svg {
            display: block;
            width: 70px;
            height: 28px;
            overflow: visible;
        }

        /* Light Mode Tuning for CV Tracking */
        :is(html.light, body.light) .project-card-cv {
            background: var(--bg-card);
        }

        :is(html.light, body.light) .cv-road-canvas {
            background: linear-gradient(
                180deg,
                rgba(241, 245, 249, 0.6) 0%,
                rgba(226, 232, 240, 0.78) 48%,
                rgba(241, 245, 249, 0.6) 100%
            );
            opacity: 0.75;
        }

        :is(html.light, body.light) .cv-car-unit {
            opacity: 0.48;
        }

        :is(html.light, body.light) .project-card-cv:hover .cv-car-unit {
            opacity: 0.88;
        }

        :is(html.light, body.light) .cv-road-divider {
            background: repeating-linear-gradient(
                to right,
                rgba(217, 119, 6, 0.35) 0px,
                rgba(217, 119, 6, 0.35) 14px,
                transparent 14px,
                transparent 26px
            );
        }

        :is(html.light, body.light) .cv-bbox {
            border-color: rgba(5, 150, 105, 0.75);
            background: rgba(5, 150, 105, 0.06);
        }

        :is(html.light, body.light) .cv-corner {
            border-color: #059669;
        }

        :is(html.light, body.light) .cv-tag {
            background: rgba(255, 255, 255, 0.96);
            border-color: rgba(5, 150, 105, 0.85);
            color: #047857;
        }

        :is(html.light, body.light) .cv-centroid::before,
        :is(html.light, body.light) .cv-centroid::after,
        :is(html.light, body.light) .cv-vector-arrow {
            background: #059669;
        }

        :is(html.light, body.light) .cv-car-unit.facing-left .cv-vector-arrow::after {
            border-right-color: #059669;
        }

        :is(html.light, body.light) .cv-car-unit.facing-right .cv-vector-arrow::after {
            border-left-color: #059669;
        }

        @media (prefers-reduced-motion: reduce) {
            .cv-car-unit {
                animation: none !important;
            }
            .cv-car-unit.top-1 {
                transform: translate3d(120px, 0, 0);
            }
            .cv-car-unit.top-2 {
                display: none;
            }
            .cv-car-unit.bottom-1 {
                transform: translate3d(140px, 0, 0);
            }
            .cv-car-unit.bottom-2 {
                display: none;
            }
        }

        .project-repo {
            margin-bottom: 10px;
            color: var(--faint);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 11px;
            font-weight: 500;
        }

        .project-title {
            margin-bottom: 8px;
            color: var(--text);
            font-size: 15px;
            font-weight: 600;
            transition: color 200ms ease;
        }

        .project-blurb {
            margin-bottom: 14px;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.52;
            flex: 1;
        }

        .project-pill {
            display: inline-block;
            border: 1px solid var(--border-soft);
            border-radius: 4px;
            background: var(--bg-soft);
            padding: 2px 7px;
            color: var(--text-2);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 10.5px;
            font-weight: 500;
            margin-right: 6px;
            margin-bottom: 6px;
        }

        .contact-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 14px;
        }

        .contact-card {
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-card);
            padding: 16px 18px;
            display: flex;
            align-items: center;
            gap: 12px;
            box-shadow: var(--shadow-sm);
            transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease, box-shadow 220ms ease;
        }

        .contact-card:hover {
            transform: translateY(-2px);
            border-color: var(--accent-border);
            box-shadow: var(--shadow-md);
        }

        .contact-icon {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            border: 1px solid var(--border-soft);
            background: var(--bg-soft);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-2);
            flex-shrink: 0;
            box-shadow: var(--shadow-sm);
            transition: border-color 200ms ease, color 200ms ease;
        }

        .contact-card:hover .contact-icon {
            border-color: var(--accent-border);
            color: var(--accent);
        }

        .contact-label {
            color: var(--text);
            font-size: 13px;
            font-weight: 500;
        }

        .contact-handle {
            color: var(--muted);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 11px;
            font-weight: 400;
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .footer {
            padding: 40px 0 60px;
            border-top: 1px solid var(--border-soft);
            display: flex;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            color: var(--faint);
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter", -apple-system-body, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 11.5px;
        }


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

            .writing-featured {
                grid-template-columns: 1fr;
            }

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

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

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

        @media (max-width: 760px) {
            .container {
                padding: 0 18px;
            }

            .topbar-inner {
                min-height: 70px;
                padding: 14px 18px;
                flex-wrap: nowrap;
                gap: 12px;
            }

            .nav {
                display: none;
                position: absolute;
                top: 76px;
                left: 18px;
                right: 18px;
                margin: 0;
                padding: 18px 16px 20px;
                flex-direction: column;
                align-items: center;
                gap: 14px;
                background: var(--header-bg);
                border: 1px solid var(--border-soft);
                border-radius: 10px;
                box-shadow: 0 12px 28px oklch(0.08 0 0 / 0.18);
            }

            .nav.is-open {
                display: flex;
            }

            .nav a {
                text-align: center;
                width: 100%;
                padding: 2px 0;
            }

            .theme-toggle {
                margin-left: auto;
            }

            .menu-toggle {
                display: inline-flex;
                margin-left: 8px;
            }

            .timeline-head {
                flex-direction: column;
                align-items: flex-start;
            }

            .timeline-filter {
                flex-wrap: wrap;
                gap: 8px;
            }

            .timeline-filter-label {
                width: 100%;
            }

            .hero {
                padding-top: 52px;
            }

            h1, .hero-title {
                font-size: 34px;
                line-height: 1.15;
            }

            .timeline-event {
                grid-template-columns: 1fr;
                gap: 0;
                padding-left: 28px;
            }

            .timeline-date {
                text-align: left;
                padding: 0 0 6px;
            }

            .timeline-spine {
                position: absolute;
                left: 0;
                top: 0;
                bottom: 0;
                width: 24px;
            }

            .timeline-spine::before {
                left: 11px;
            }

            .timeline-dot {
                left: 1px;
            }

            .timeline-body {
                padding-left: 0;
            }

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

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

            .writing-header {
                align-items: center;
            }

            .writing-lamp-fixture {
                margin-top: -5px;
            }

            .writing-lamp-svg {
                width: 140px;
                height: auto;
            }
        }

        @media (max-width: 520px) {
            .brand-name {
                font-size: 13px;
            }

            .nav a {
                font-size: 14px;
            }

            .hero-title {
                font-size: 28px;
                letter-spacing: -0.6px;
            }

            .hero-actions {
                width: 100%;
            }

            .hero-actions .btn {
                width: 100%;
                justify-content: center;
            }

            .hero-social {
                width: 100%;
                justify-content: flex-start;
                gap: 10px;
                margin-top: 2px;
            }

            .now-card {
                padding: 16px;
            }

            .now-row {
                grid-template-columns: 64px 1fr;
                gap: 10px;
            }

            .timeline-filter {
                width: 100%;
            }

            .filter-chip {
                padding: 6px 10px;
            }

            .timeline-title {
                font-size: 14px;
            }

            .timeline-org,
            .timeline-blurb {
                font-size: 12.5px;
            }

            .writing-featured-content {
                padding: 18px;
            }

            .writing-featured h3 {
                font-size: 20px;
            }

            .writing-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            .writing-lamp-fixture {
                align-self: flex-end;
                margin-top: -45px;
                margin-bottom: -10px;
            }

            .writing-lamp-svg {
                width: 120px;
                height: auto;
            }

            .lamp-night-tooltip {
                right: 0;
                top: calc(100% + 4px);
                max-width: min(300px, calc(100vw - 32px));
                white-space: normal;
                border-radius: 8px;
                padding: 8px 12px;
                gap: 8px;
            }

            .contact-card {
                padding: 11px;
            }

            .contact-handle {
                font-size: 9px;
            }
        }

        @media (max-width: 420px) {
            .wrapper {
                padding-left: 0.75rem;
                padding-right: 0.75rem;
            }
        }

/* Homepage reduced-motion additions */
@media (prefers-reduced-motion: reduce) {
    .conduit-ball-group,
    .conduit-ripple,
    .conduit-spark,
    .cv-car-unit {
        display: none !important;
        animation: none !important;
    }
    .lamp-chain-pull,
    .lamp-lever-arm,
    .lamp-pull-cord:hover .lamp-chain-pull,
    .lamp-pull-cord.is-pulling .lamp-chain-pull,
    .lamp-pull-cord.is-pulling .lamp-lever-arm {
        animation: none !important;
        transform: none !important;
        transition: none !important;
    }
}
