:root {
    --bg: #fafaf9;
    --fg: #0a0a0a;
    --muted: #737373;
    --line: #e5e5e5;
    --accent: #0a0a0a;
    --tag-bg: #f0f0ef;
    --code-bg: #f0f0ef;
    --serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
    --sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

[data-theme="dark"] {
    --bg: #0a0a0a;
    --fg: #fafaf9;
    --muted: #737373;
    --line: #262626;
    --accent: #fafaf9;
    --tag-bg: #171717;
    --code-bg: #171717;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

::selection {
    background: var(--fg);
    color: var(--bg);
}

/* Cursor dot */
.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--fg);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, opacity 0.3s ease;
    mix-blend-mode: difference;
    opacity: 0;
}

@media (hover: hover) {
    .cursor-dot { opacity: 1; }
    body { cursor: none; }
    a, button { cursor: none; }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3rem;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.nav.scrolled {
    border-bottom-color: var(--line);
}

.logo {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--fg);
}

.nav-links a.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    width: 4px;
    height: 4px;
    background: var(--fg);
    border-radius: 50%;
    transform: translateY(-50%);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--fg);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--line);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--fg);
}

.theme-toggle:hover {
    border-color: var(--fg);
}

.theme-icon {
    width: 12px;
    height: 12px;
    background: var(--fg);
    border-radius: 50%;
    transition: all 0.3s ease;
}

[data-theme="dark"] .theme-icon {
    background: transparent;
    box-shadow: inset -4px -4px 0 var(--fg);
}

/* Main */
main {
    padding: 0 3rem;
    max-width: 1280px;
    margin: 0 auto;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 0 6rem;
    position: relative;
}

.hero-inner {
    max-width: 900px;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
}

.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: reveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title .line:nth-child(1) { animation-delay: 0.2s; }
.hero-title .line:nth-child(2) {
    animation-delay: 0.4s;
    color: var(--muted);
    font-style: italic;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--fg);
    max-width: 620px;
    margin-bottom: 1rem;
    opacity: 0;
    animation: reveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-sub-secondary {
    font-size: 0.9375rem;
    color: var(--muted);
    max-width: 620px;
    margin-bottom: 3rem;
    opacity: 0;
    animation: reveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

.hero-sub-secondary a {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--fg);
    padding-bottom: 1px;
    transition: opacity 0.2s ease;
}

.hero-sub-secondary a:hover {
    opacity: 0.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    opacity: 0;
    animation: reveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    border: 1px solid var(--fg);
}

.btn-primary {
    background: var(--fg);
    color: var(--bg);
}

.btn-primary:hover {
    background: transparent;
    color: var(--fg);
}

.btn-secondary {
    background: transparent;
    color: var(--fg);
}

.btn-secondary:hover {
    background: var(--fg);
    color: var(--bg);
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    opacity: 0;
    animation: reveal 1s ease 1.2s forwards;
}

.hero-scroll span {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: var(--line);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--fg);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* Sections */
.section {
    padding: 7rem 0;
    border-top: 1px solid var(--line);
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.section-num {
    font-family: var(--mono);
    font-size: 0.875rem;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.section-header h2 {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.section-link {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.section-link:hover {
    color: var(--fg);
}

.section-meta {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
}

/* Post list on home */
.post-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-item {
    border-top: 1px solid var(--line);
    transition: padding-left 0.3s ease;
}

.post-item:last-child {
    border-bottom: 1px solid var(--line);
}

.post-item:hover {
    padding-left: 1rem;
}

.post-item a {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 2.5rem;
    align-items: baseline;
    padding: 1.75rem 0;
    text-decoration: none;
    color: var(--fg);
}

.post-item time {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

.post-item h3 {
    font-family: var(--serif);
    font-size: 1.375rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.post-item p {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.6;
}

.post-item .tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-self: center;
}

.tags span {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.25rem 0.625rem;
    background: var(--tag-bg);
    border-radius: 999px;
    letter-spacing: 0.02em;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 5rem;
    align-items: start;
}

.about-text p {
    font-size: 1.0625rem;
    margin-bottom: 1.5rem;
    max-width: 620px;
}

.about-quote {
    font-family: var(--serif);
    font-style: italic;
    color: var(--muted);
    border-left: 2px solid var(--fg);
    padding-left: 1.5rem;
    margin-top: 2.5rem !important;
}

.about-side {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-left: 3rem;
    border-left: 1px solid var(--line);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-num {
    font-family: var(--serif);
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1;
}

.stat-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Stack */
.stack-list {
    list-style: none;
    max-width: 900px;
}

.stack-list li {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 3rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line);
    transition: padding-left 0.3s ease;
}

.stack-list li:hover {
    padding-left: 1rem;
}

.stack-key {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding-top: 0.25rem;
}

.stack-val {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 400;
}

/* Now list */
.now-list {
    list-style: none;
    max-width: 900px;
}

.now-list li {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 2rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--line);
    align-items: baseline;
}

.now-key {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--fg);
    font-weight: 400;
}

.now-val {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.contact-item {
    background: var(--bg);
    padding: 2.25rem 1.75rem;
    text-decoration: none;
    color: var(--fg);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: background 0.3s ease;
}

.contact-item:hover {
    background: var(--fg);
    color: var(--bg);
}

.contact-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.contact-item:hover .contact-label {
    color: var(--bg);
    opacity: 0.6;
}

.contact-val {
    font-family: var(--serif);
    font-size: 1.125rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--line);
    padding: 2rem 3rem;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-inner {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    flex-wrap: wrap;
}

.footer-inner a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-inner a:hover {
    color: var(--fg);
}

.footer-sep {
    opacity: 0.5;
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   PAGE HEADER (blog/projects/uses)
   ================================ */
.page-header {
    padding: 10rem 0 5rem;
    max-width: 900px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 5rem;
}

.page-title {
    font-family: var(--serif);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.page-sub {
    font-size: 1.125rem;
    color: var(--muted);
    max-width: 600px;
    line-height: 1.7;
}

.page-sub strong {
    color: var(--fg);
    font-weight: 500;
}

/* ================================
   BLOG PAGE
   ================================ */
.blog-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--fg);
    color: var(--fg);
}

.filter-btn.active {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}

.blog-year {
    margin-bottom: 5rem;
}

.year-label {
    font-family: var(--mono);
    font-size: 0.875rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    font-weight: 400;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.post-list-full {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.post-item-full {
    border-bottom: 1px solid var(--line);
    transition: padding-left 0.3s ease;
}

.post-item-full.hidden {
    display: none;
}

.post-item-full:hover {
    padding-left: 1rem;
}

.post-item-full a {
    display: block;
    padding: 1.75rem 0;
    text-decoration: none;
    color: var(--fg);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.post-meta time {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

.post-item-full h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.post-item-full:hover h3 {
    color: var(--fg);
}

.post-item-full p {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.6;
    max-width: 720px;
}

.archive-note {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    margin: 4rem 0 8rem;
    text-align: center;
}

.archive-note a {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--fg);
}

/* ================================
   INDIVIDUAL BLOG POST
   ================================ */
.post {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 3rem;
}

.post-header {
    padding: 9rem 0 4rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4rem;
}

.back-link {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--fg);
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.post-tags span {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.25rem 0.625rem;
    background: var(--tag-bg);
    border-radius: 999px;
}

.post-header h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.015em;
    margin-bottom: 1.75rem;
}

.post-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

.post-info .sep {
    opacity: 0.5;
}

.post-body {
    font-family: var(--serif);
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--fg);
}

.post-body .lead {
    font-size: 1.25rem;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body h2 {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 500;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 1.25rem;
}

.post-body h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 3px;
    background: var(--fg);
}

.post-body h3 {
    font-family: var(--serif);
    font-size: 1.375rem;
    font-weight: 500;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-body a {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--fg);
    transition: opacity 0.2s ease;
}

.post-body a:hover {
    opacity: 0.6;
}

.post-body strong {
    font-weight: 600;
}

.post-body em {
    font-style: italic;
    color: var(--muted);
}

.post-body ul,
.post-body ol {
    margin: 1.5rem 0 1.5rem 2rem;
}

.post-body li {
    margin-bottom: 0.75rem;
}

.post-body blockquote {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--muted);
    border-left: 3px solid var(--fg);
    padding: 0.75rem 0 0.75rem 1.75rem;
    margin: 2.5rem 0;
    line-height: 1.65;
}

.post-body code {
    font-family: var(--mono);
    font-size: 0.9em;
    background: var(--code-bg);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: var(--fg);
}

.post-body pre {
    font-family: var(--mono);
    background: var(--code-bg);
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
    border: 1px solid var(--line);
}

.post-body pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

.post-body hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 3.5rem 0;
}

.post-body .post-outro {
    font-style: italic;
    color: var(--muted);
    font-size: 1rem;
    padding: 1.5rem;
    background: var(--tag-bg);
    border-radius: 6px;
    border-left: 3px solid var(--muted);
}

.post-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9375rem;
    font-family: var(--sans);
}

.post-table th,
.post-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.post-table th {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--fg);
}

.post-table code {
    font-size: 0.85em;
}

.post-footer {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--line);
    padding-bottom: 6rem;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.post-nav a {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--fg);
    transition: all 0.3s ease;
    font-family: var(--sans);
}

.post-nav a:hover {
    border-color: var(--fg);
}

.post-nav-next {
    text-align: right;
    align-items: flex-end;
}

.post-nav-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.post-nav-title {
    font-family: var(--serif);
    font-size: 1rem;
}

/* ================================
   PROJECTS PAGE
   ================================ */
.proj-section {
    margin-bottom: 6rem;
}

.proj-heading {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.proj-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.proj-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--fg);
    transition: all 0.3s ease;
    background: var(--bg);
}

.proj-card:hover {
    border-color: var(--fg);
    transform: translateY(-2px);
}

.proj-card.featured {
    background: var(--tag-bg);
}

.proj-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
}

.proj-lang,
.proj-lang-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot.rust { background: #dea584; }
.dot.ts { background: #3178c6; }
.dot.go { background: #00add8; }
.dot.kt { background: #a97bff; }
.dot.c { background: #555; }
.dot.shell { background: #89e051; }
.dot.yaml { background: #cb171e; }

.proj-stars {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
}

.proj-card h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.proj-card p {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.65;
    flex-grow: 1;
}

.proj-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.proj-tags span {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.proj-list {
    display: flex;
    flex-direction: column;
}

.proj-row,
.proj-row-static {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--fg);
    transition: padding-left 0.3s ease;
    gap: 2rem;
}

.proj-row:hover {
    padding-left: 1rem;
}

.proj-row-left {
    flex: 1;
    min-width: 0;
}

.proj-row-left h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.proj-row-left p {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.6;
}

.proj-row-left code {
    font-family: var(--mono);
    font-size: 0.85em;
    background: var(--code-bg);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.proj-row-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    white-space: nowrap;
}

.archived .proj-row-static {
    opacity: 0.55;
}

.archived-tag {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    letter-spacing: 0.05em;
}

.contributions {
    margin-bottom: 8rem;
}

.contrib-list {
    list-style: none;
}

.contrib-list li {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.contrib-list li a {
    font-family: var(--mono);
    font-size: 0.9375rem;
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--fg);
    padding-bottom: 1px;
    flex-shrink: 0;
}

.contrib-desc {
    color: var(--muted);
    font-size: 0.9375rem;
}

/* ================================
   USES PAGE
   ================================ */
.uses-section {
    margin-bottom: 4rem;
}

.uses-header {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.uses-num {
    font-family: var(--mono);
    font-size: 0.875rem;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.uses-header h2 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
}

.uses-list {
    list-style: none;
    max-width: 1000px;
}

.uses-list li {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 2rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--line);
    align-items: baseline;
}

.uses-list li:last-child {
    border-bottom: none;
}

.uses-key {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

.uses-val {
    font-size: 1rem;
    line-height: 1.65;
}

.uses-list.wontuse .uses-val {
    color: var(--muted);
    font-style: italic;
}

.uses-footer {
    margin: 5rem 0 8rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9375rem;
    font-family: var(--mono);
}

.uses-footer a {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--fg);
}

/* ================================
   FEATURED POST (homepage)
   ================================ */
.featured-post {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    text-decoration: none;
    color: var(--fg);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: all 0.4s ease;
    background: var(--bg);
}

.featured-post:hover {
    border-color: var(--fg);
}

.featured-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #0a0a0a;
}

.featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    filter: grayscale(20%) contrast(1.05);
}

.featured-post:hover .featured-media img {
    transform: scale(1.03);
    filter: grayscale(0%) contrast(1);
}

.featured-media-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(35%) contrast(1.05) brightness(0.9);
    transition: filter 0.6s ease;
}

.featured-post:hover .featured-media-video video {
    filter: grayscale(0%) contrast(1) brightness(1);
}

.video-overlay {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem 0.4rem 0.6rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 999px;
    color: #fff;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    z-index: 2;
    pointer-events: none;
}

.play-icon {
    font-size: 0.6rem;
    display: inline-block;
    line-height: 1;
}

.play-label {
    text-transform: uppercase;
}

.meta-badge {
    font-family: var(--mono);
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--fg);
    color: var(--bg);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.featured-body {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.featured-meta .sep {
    opacity: 0.5;
}

.featured-body h3 {
    font-family: var(--serif);
    font-size: 1.875rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.featured-body p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.75;
}

.featured-cta {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--fg);
    letter-spacing: 0.05em;
    padding-top: 0.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.featured-post:hover .featured-cta {
    transform: translateX(4px);
}

/* ================================
   CAREER TIMELINE
   ================================ */
.career-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 900px;
    position: relative;
}

.career-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background: var(--line);
}

.career-item {
    padding: 1.75rem 0 1.75rem 2.5rem;
    border-bottom: 1px solid var(--line);
    position: relative;
    transition: padding-left 0.3s ease;
}

.career-item:last-child {
    border-bottom: none;
}

.career-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 2.25rem;
    width: 9px;
    height: 9px;
    background: var(--bg);
    border: 2px solid var(--muted);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.career-item:hover {
    padding-left: 3rem;
}

.career-item:hover::before {
    background: var(--fg);
    border-color: var(--fg);
    transform: scale(1.2);
}

.career-period {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.career-year {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

.career-status,
.career-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-current {
    background: var(--fg);
    color: var(--bg);
}

.career-tag.binance {
    background: #f0b90b;
    color: #0a0a0a;
    font-weight: 500;
}

.career-tag.tron {
    background: #ff060a;
    color: #fff;
    font-weight: 500;
}

.career-item h3 {
    font-family: var(--serif);
    font-size: 1.375rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: -0.005em;
}

.career-item p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 720px;
}

.career-story {
    display: inline-block;
    margin-top: 0.75rem;
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--fg);
    padding-bottom: 1px;
    transition: opacity 0.2s ease;
}

.career-story:hover {
    opacity: 0.6;
}

/* ================================
   LIFE SECTION
   ================================ */
.life-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.life-card {
    position: relative;
    overflow: hidden;
    background: var(--tag-bg);
    border: 1px solid var(--line);
    transition: all 0.4s ease;
}

.life-card:hover {
    border-color: var(--fg);
    transform: translateY(-4px);
}

.life-card-wide {
    grid-column: span 2;
}

.life-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    filter: grayscale(15%) contrast(1.02);
    transition: all 0.6s ease;
}

.life-card:hover img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.life-card-wide img {
    height: 320px;
}

.life-card figcaption {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.life-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.life-card figcaption p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--fg);
}

.life-card figcaption em {
    color: var(--muted);
    font-style: italic;
}

/* ================================
   POST FIGURES (inline images)
   ================================ */
.post-hero {
    max-width: 720px;
    margin: 0 auto 3rem;
    padding: 0 3rem;
}

.post-hero img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--line);
    filter: grayscale(10%);
}

.post-hero figcaption {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    padding-top: 0.75rem;
    line-height: 1.6;
    font-style: italic;
}

.post-fig {
    margin: 2.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.post-fig img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--line);
    filter: grayscale(10%);
    transition: filter 0.4s ease;
}

.post-fig:hover img {
    filter: grayscale(0%);
}

.post-fig figcaption {
    font-family: var(--sans);
    font-size: 0.9375rem;
    color: var(--muted);
    font-style: italic;
    line-height: 1.6;
    padding-left: 1rem;
    border-left: 2px solid var(--line);
}

.post-fig-inline {
    max-width: 480px;
    margin: 2rem auto;
}

.post-fig-inline img {
    background: var(--bg);
}

/* ================================
   POST VIDEO
   ================================ */
.post-video {
    margin: 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #000;
    padding: 0;
    border: 1px solid var(--line);
}

.post-video video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 640px;
    background: #000;
}

/* GIF-like loop: no controls, no cursor change, no PiP */
.post-video-loop video {
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

.post-video-loop video::-webkit-media-controls {
    display: none !important;
}

.post-video-loop video::-webkit-media-controls-enclosure {
    display: none !important;
}

/* Medium-sized inline loop */
.post-video-medium {
    margin: 2.5rem auto;
    max-width: 620px;
    border: 1px solid var(--line);
}

.post-video-medium video {
    max-height: 440px;
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    background: #000;
    filter: grayscale(15%) contrast(1.02);
}

/* Small centered loop (for detail shots) */
.post-video-small {
    margin: 2rem auto;
    max-width: 360px;
    border: 1px solid var(--line);
}

.post-video-small video {
    max-height: 340px;
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    filter: grayscale(10%) contrast(1.02);
}

/* Optional caption below any inline video */
.post-video-note {
    margin-top: 0.5rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    text-align: center;
    letter-spacing: 0.03em;
    font-style: normal;
}

/* ================================
   YEAR-BASED SECTION STYLES
   ================================ */
.year-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, var(--fg) 0%, var(--fg) 60px, var(--line) 60px, var(--line) 100%);
    margin: 4rem 0 3rem;
}

.year-section {
    display: flex !important;
    align-items: baseline;
    gap: 1.5rem;
    padding-left: 0 !important;
    margin-top: 2.5rem !important;
    flex-wrap: wrap;
}

.year-section::before {
    display: none !important;
}

.year-mark {
    font-family: var(--mono);
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.35rem 0.9rem;
    background: var(--fg);
    color: var(--bg);
    letter-spacing: 0.1em;
    line-height: 1;
    display: inline-block;
    border-radius: 2px;
}

/* Thesis-rules list styling */
.thesis-rules {
    counter-reset: rule;
    list-style: none;
    margin: 2rem 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.thesis-rules li {
    counter-increment: rule;
    position: relative;
    padding: 1.5rem 1.5rem 1.5rem 4.5rem;
    background: var(--tag-bg);
    border-left: 3px solid var(--fg);
    line-height: 1.75;
    margin: 0 !important;
}

.thesis-rules li::before {
    content: counter(rule, decimal-leading-zero);
    position: absolute;
    left: 1.25rem;
    top: 1.5rem;
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

.post-video figcaption {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.7;
    padding: 1rem 1.5rem 1.25rem;
    background: var(--bg);
    border-top: 1px solid var(--line);
    font-style: normal;
    letter-spacing: 0.02em;
}

.post-video figcaption strong {
    color: var(--fg);
    font-weight: 500;
    margin-right: 0.25rem;
}

.post-info-badge {
    font-family: var(--mono);
    font-size: 0.7rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--fg);
    color: var(--bg);
}

.post-body cite {
    display: block;
    font-size: 0.875rem;
    color: var(--muted);
    font-style: normal;
    margin-top: 0.75rem;
    padding-left: 0.5rem;
    font-family: var(--mono);
    letter-spacing: 0.02em;
}

/* ================================
   BLOG HEADER DECO
   ================================ */
.blog-page-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: none;
}

.blog-header-content {
    max-width: 640px;
}

.blog-header-deco {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

.blog-header-deco img {
    width: 100%;
    max-width: 340px;
    height: 100%;
    object-fit: contain;
    filter: contrast(1.1);
}

[data-theme="dark"] .blog-header-deco img {
    filter: invert(1) contrast(1.1);
}

.post-featured-badge {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--bg);
    background: var(--fg);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-right: 0.25rem;
}

.featured-inline {
    background: var(--tag-bg);
}

.featured-inline a {
    padding: 1.75rem 1.5rem !important;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 900px) {
    .nav {
        padding: 1rem 1.25rem;
    }
    .nav-links {
        gap: 1rem;
    }
    .nav-links a {
        font-size: 0.8125rem;
    }
    .nav-links a.active::before {
        display: none;
    }
    main, .footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .hero {
        padding: 6rem 0 4rem;
    }
    .section {
        padding: 4.5rem 0;
    }
    .section-header {
        gap: 1rem;
        margin-bottom: 2rem;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .about-side {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--line);
        padding-top: 2rem;
        flex-direction: row;
        justify-content: space-between;
    }
    .stat-num {
        font-size: 2.5rem;
    }
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .post-item a {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .post-item .tags {
        margin-top: 0.5rem;
    }
    .stack-list li,
    .now-list li {
        grid-template-columns: 80px 1fr;
        gap: 1.25rem;
        padding: 1rem 0;
    }
    .stack-val {
        font-size: 1.0625rem;
    }
    .post {
        padding: 0 1.25rem;
    }
    .post-header {
        padding: 7rem 0 3rem;
        margin-bottom: 3rem;
    }
    .post-body {
        font-size: 1rem;
    }
    .post-body .lead {
        font-size: 1.125rem;
    }
    .post-nav {
        grid-template-columns: 1fr;
    }
    .post-nav-next {
        text-align: left;
        align-items: flex-start;
    }
    .proj-grid {
        grid-template-columns: 1fr;
    }
    .proj-row, .proj-row-static {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .uses-list li {
        grid-template-columns: 120px 1fr;
        gap: 1rem;
    }
    .contrib-list li {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    .footer {
        padding: 2rem 1.25rem;
    }
    .hero-scroll {
        display: none;
    }
    .page-header {
        padding: 7rem 0 3rem;
        margin-bottom: 3rem;
    }
    .featured-post {
        grid-template-columns: 1fr;
    }
    .featured-media {
        aspect-ratio: 16/9;
    }
    .featured-body {
        padding: 2rem 1.5rem;
    }
    .featured-body h3 {
        font-size: 1.5rem;
    }
    .life-grid {
        grid-template-columns: 1fr;
    }
    .life-card-wide {
        grid-column: span 1;
    }
    .life-card img,
    .life-card-wide img {
        height: 220px;
    }
    .blog-page-header {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .blog-header-deco {
        height: 140px;
        order: -1;
    }
    .career-item:hover {
        padding-left: 2.5rem;
    }
    .post-hero {
        padding: 0 1.25rem;
    }
}

@media (max-width: 560px) {
    .nav-links {
        display: none;
    }
    .theme-toggle {
        margin-left: auto;
    }
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    .btn-primary, .btn-secondary {
        justify-content: center;
    }
    .uses-list li {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    .uses-key {
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }
}
