
:root {
--bg:        #090909;
--surface:   #111111;
--border:    #1e1e1e;
--muted:     #555;
--sub:       #888;
--text:      #d4d4d4;
--heading:   #efefef;
--accent:    #6c6cf5;
--accent-dim:#3a3a8a;
--green:     #3ddc84;
--mono:      'JetBrains Mono', monospace;
--sans:      'Inter', sans-serif;
--display:   'Space Grotesk', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
background: var(--bg);
color: var(--text);
font-family: var(--sans);
font-size: 15px;
line-height: 1.7;
-webkit-font-smoothing: antialiased;
overflow-x: hidden;
}

/* grain overlay */
body::before {
content: '';
position: fixed;
inset: 0;
z-index: 0;
pointer-events: none;
opacity: 0.025;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
background-size: 128px;
}

/* ─── layout ─── */
.container {
position: relative;
z-index: 1;
max-width: 780px;
margin: 0 auto;
padding: 0 28px;
}

/* ─── nav ─── */
nav {
position: fixed;
top: 0; left: 0; right: 0;
z-index: 100;
padding: 20px 28px;
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(to bottom, rgba(9,9,9,0.95) 60%, transparent);
backdrop-filter: blur(4px);
}

.nav-logo {
font-family: var(--mono);
font-size: 13px;
color: var(--sub);
letter-spacing: 0.04em;
text-decoration: none;
transition: color .2s;
}
.nav-logo:hover { color: var(--heading); }

.nav-links {
display: flex;
gap: 28px;
list-style: none;
}
.nav-links a {
font-family: var(--mono);
font-size: 12px;
color: var(--sub);
text-decoration: none;
letter-spacing: 0.06em;
transition: color .2s;
}
.nav-links a:hover { color: var(--heading); }
.nav-links a.nav-active { color: var(--heading); }

/* ─── blogs ─── */
.blogs-container { max-width: 980px; }
.blogs-hero {
  padding: 160px 0 78px;
  border-bottom: 1px solid var(--border);
}
.blogs-hero h1 { max-width: 700px; margin-bottom: 22px; }
.blogs-hero h1 span { color: var(--accent); }
.blogs-intro {
  max-width: 520px;
  color: var(--sub);
  font-size: 16px;
  line-height: 1.8;
}
.blogs-meta {
  display: flex;
  gap: 24px;
  margin-top: 30px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61,220,132,.1);
}
.featured-post {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  min-height: 330px;
  margin: 56px 0 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.featured-copy { padding: 42px; display: flex; flex-direction: column; }
.post-kicker {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.featured-copy h2 {
  max-width: 500px;
  margin: 18px 0 14px;
  color: var(--heading);
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.featured-copy p { max-width: 500px; color: var(--sub); font-size: 14px; line-height: 1.8; }
.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 30px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.text-link {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.text-link span { color: var(--accent); font-size: 14px; }
.text-link:hover { color: var(--accent); }
.featured-art {
  position: relative;
  min-height: 300px;
  background: radial-gradient(circle at center, rgba(108,108,245,.2), transparent 42%), linear-gradient(135deg, #121225, #101010 70%);
  overflow: hidden;
}
.featured-art::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .4;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 28px 28px;
}
.art-orbit { position: absolute; top: 50%; left: 50%; border: 1px solid rgba(151,151,255,.42); border-radius: 50%; transform: translate(-50%, -50%) rotate(-24deg); }
.orbit-one { width: 230px; height: 120px; }
.orbit-two { width: 120px; height: 230px; transform: translate(-50%, -50%) rotate(36deg); }
.art-core {
  position: absolute;
  top: 50%; left: 50%;
  display: grid; place-items: center;
  width: 58px; height: 58px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  color: var(--heading);
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(108,108,245,.3);
  box-shadow: 0 0 38px rgba(108,108,245,.45);
}
.art-label { position: absolute; color: rgba(212,212,212,.55); font: 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.art-label-top { top: 25%; right: 16%; }
.art-label-bottom { bottom: 25%; left: 16%; }
.blog-list-section { padding-bottom: 90px; }
.blog-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.blog-toolbar .section-title { margin-bottom: 0; }
.blog-search { display: flex; align-items: center; gap: 8px; width: 210px; padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.blog-search:focus-within { border-color: var(--accent); color: var(--accent); }
.blog-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: 11px var(--mono); }
.blog-search input::placeholder { color: var(--muted); }
.blog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 28px; }
.filter-btn { padding: 6px 11px; border: 1px solid var(--border); border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font: 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; transition: all .2s; }
.filter-btn:hover, .filter-btn.active { border-color: var(--accent-dim); color: var(--heading); background: rgba(108,108,245,.1); }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.blog-card { min-height: 270px; padding: 25px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; transition: border-color .2s, transform .2s; }
.blog-card:hover { border-color: var(--muted); transform: translateY(-2px); }
.blog-card[hidden] { display: none; }
.blog-card-top { display: flex; justify-content: space-between; align-items: center; }
.post-number { color: var(--muted); font: 11px var(--mono); }
.blog-card h3 { margin: 28px 0 10px; color: var(--heading); font: 500 21px/1.18 var(--display); letter-spacing: -.025em; }
.blog-card p { color: var(--sub); font-size: 13px; line-height: 1.7; }
.blog-card .post-footer { padding-top: 24px; }
.empty-state { padding: 38px 0; color: var(--muted); font: 12px var(--mono); text-align: center; }
.blogs-page footer { margin-top: 0; }

/* ─── article ─── */
.article-page { background: #0b0b0a; }
.article-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 72px;
  padding: 0 max(28px, calc((100vw - 1110px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11,11,10,.88);
  border-bottom: 1px solid rgba(212,212,212,.08);
  backdrop-filter: blur(10px);
}
.article-back, .article-brand, .article-actions { min-width: 160px; }
.article-back { color: var(--sub); font: 11px var(--mono); letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.article-back:hover, .article-brand:hover { color: var(--heading); }
.article-brand { color: var(--heading); font: 22px Georgia, serif; letter-spacing: -.04em; text-decoration: none; }
.article-brand em { color: var(--sub); font-size: 18px; }
.article-actions { display: flex; justify-content: end; gap: 8px; }
.icon-button { width: 30px; height: 30px; border: 0; background: transparent; color: var(--sub); cursor: pointer; font: 20px Georgia, serif; }
.icon-button:hover { color: var(--heading); }
.article-shell { max-width: 1110px; margin: 0 auto; padding: 150px 28px 100px; display: grid; grid-template-columns: 210px minmax(0, 780px); gap: 72px; }
.article-sidebar { padding-top: 32px; }
.sidebar-back { display: block; margin-bottom: 74px; font-size: 10px; }
.contents-label { margin-bottom: 28px; color: var(--muted); font: 10px var(--mono); letter-spacing: .22em; text-transform: uppercase; }
.contents-nav { display: flex; flex-direction: column; gap: 20px; }
.contents-nav a { color: #777169; font: italic 15px/1.45 Georgia, serif; text-decoration: none; transition: color .2s; }
.contents-nav a:hover, .contents-nav a.active { color: var(--heading); }
.article-header { padding-bottom: 50px; }
.article-meta { display: flex; justify-content: space-between; gap: 24px; color: #8b8277; font: 10px var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.article-meta span:first-child { color: var(--accent); }
.article-header h1 { max-width: 820px; margin: 40px auto 20px; color: #eee9df; font: 400 clamp(44px, 6vw, 76px)/.98 Georgia, serif; letter-spacing: -.06em; text-align: center; }
.article-header h1 em { color: #c0ac94; font-style: italic; }
.article-dek { margin: 0 auto; color: #8b8277; font: italic 20px/1.45 Georgia, serif; text-align: center; }
.article-rule { width: 64px; height: 1px; margin: 38px auto 34px; background: var(--border); }
.listen-bar { display: grid; grid-template-columns: 46px 52px 1fr 78px; gap: 12px; align-items: center; color: #8b8277; font: 10px var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.listen-button { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: transparent; color: #c0ac94; cursor: pointer; }
.listen-button:hover { border-color: var(--muted); color: var(--heading); }
.pause-icon { display: none; }
.is-playing .play-icon { display: none; }
.is-playing .pause-icon { display: block; }
.listen-track { height: 1px; background: var(--border); overflow: hidden; }
.listen-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .35s linear; }
.listen-time { color: #70685f; font-size: 9px; letter-spacing: .06em; text-align: right; }
.article-prose { color: #d7d1c8; font: 18px/1.8 Georgia, serif; }
.article-prose p { margin: 0 0 34px; }
.article-prose .lead-paragraph { margin-bottom: 42px; }
.drop-cap { float: left; margin: 6px 10px 0 0; color: #eee9df; font: 96px/.68 Georgia, serif; }
.article-prose h2 { margin: 92px 0 24px; color: #eee9df; font: 400 36px/1.1 Georgia, serif; letter-spacing: -.04em; scroll-margin-top: 100px; }
.article-prose blockquote { margin: 64px 0; padding: 10px 0 10px 28px; border-left: 1px solid var(--accent); color: #b7a791; font: italic 27px/1.4 Georgia, serif; }
.equation-card { margin: 42px 0; padding: 24px 28px; border: 1px solid var(--border); background: rgba(255,255,255,.018); }
.equation-label, .equation-note { display: block; color: var(--muted); font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.equation-card code { display: block; margin: 18px 0 14px; color: #d9c7aa; font: 17px var(--mono); }
.equation-note { color: #81786d; font-size: 10px; letter-spacing: .03em; text-transform: none; }
.article-figure { margin: 64px 0 78px; }
.article-figure img { display: block; width: 100%; max-height: 430px; object-fit: cover; filter: saturate(.7) brightness(.72); }
.article-figure figcaption { margin-top: 12px; color: #7c746a; font: italic 13px Georgia, serif; }
.article-prose ul { margin: -10px 0 38px 24px; color: #bdb5aa; }
.article-prose li { padding-left: 8px; margin: 8px 0; }
.article-prose li::marker { color: var(--accent); }
.article-prose pre { margin: 40px 0; padding: 25px 28px; overflow-x: auto; border: 1px solid var(--border); background: #10100f; }
.article-prose pre code { color: #bfb5a7; font: 13px/1.75 var(--mono); }
.article-finish { margin: 70px 0 20px !important; color: #9a8c79; font-style: italic; text-align: center; }
.article-footer { margin-top: 90px; padding: 42px 0 0; border-top: 1px solid var(--border); text-align: center; }
.article-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; color: #857c71; font: 10px var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.article-next-label { margin-top: 92px; color: var(--muted); font: 10px var(--mono); letter-spacing: .22em; text-transform: uppercase; }
.article-next { display: block; margin-top: 20px; color: #b4a99a; font: italic 24px Georgia, serif; text-decoration: none; }
.article-next:hover { color: var(--heading); }

/* ─── hero ─── */
#hero {
padding: 160px 0 100px;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
}

.hero-eyebrow {
font-family: var(--mono);
font-size: 12px;
color: var(--accent);
letter-spacing: 0.12em;
text-transform: uppercase;
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 10px;
}
.hero-eyebrow::before {
content: '';
display: inline-block;
width: 24px; height: 1px;
background: var(--accent);
}

h1 {
font-family: var(--display);
font-size: clamp(44px, 8vw, 72px);
font-weight: 600;
color: var(--heading);
letter-spacing: -0.03em;
line-height: 1.05;
margin-bottom: 12px;
}

.hero-role {
font-family: var(--display);
font-size: clamp(18px, 3vw, 24px);
font-weight: 300;
color: var(--sub);
letter-spacing: -0.01em;
margin-bottom: 36px;
height: 1.6em;
overflow: hidden;
}

#typed-text {
color: var(--text);
border-right: 2px solid var(--accent);
padding-right: 3px;
animation: blink 0.9s step-end infinite;
}
@keyframes blink { 50% { border-color: transparent; } }

.hero-bio {
max-width: 520px;
color: var(--sub);
font-size: 15px;
line-height: 1.8;
margin-bottom: 44px;
}
.hero-bio strong { color: var(--text); font-weight: 500; }

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

.btn {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 9px 20px;
font-family: var(--mono);
font-size: 12px;
letter-spacing: 0.05em;
text-decoration: none;
border-radius: 6px;
transition: all .2s;
cursor: pointer;
border: 1px solid transparent;
}
.btn-primary {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}
.btn-primary:hover { background: #5a5ae0; transform: translateY(-1px); }

.btn-ghost {
background: transparent;
color: var(--sub);
border-color: var(--border);
}
.btn-ghost:hover { color: var(--heading); border-color: var(--muted); }

.social-row {
display: flex;
gap: 20px;
margin-top: 20px;
align-items: center;
}
.social-row a {
color: var(--muted);
text-decoration: none;
font-size: 13px;
font-family: var(--mono);
transition: color .2s;
display: flex;
align-items: center;
gap: 6px;
}
.social-row a:hover { color: var(--heading); }

/* ─── section ─── */
section { padding: 80px 0; }

.section-label {
font-family: var(--mono);
font-size: 11px;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--accent);
margin-bottom: 10px;
}

.section-title {
font-family: var(--display);
font-size: 28px;
font-weight: 600;
color: var(--heading);
letter-spacing: -0.02em;
margin-bottom: 40px;
}

.divider {
width: 100%;
height: 1px;
background: var(--border);
margin-bottom: 64px;
}

/* ─── about ─── */
.about-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 48px;
align-items: start;
}
.about-text p { color: var(--sub); margin-bottom: 14px; line-height: 1.85; }
.about-text p strong { color: var(--text); font-weight: 500; }

.about-stats {
display: flex;
flex-direction: column;
gap: 24px;
}
.stat {
padding: 20px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
}
.stat-num {
font-family: var(--display);
font-size: 36px;
font-weight: 700;
color: var(--heading);
letter-spacing: -0.03em;
line-height: 1;
}
.stat-num span { color: var(--accent); }
.stat-label {
font-family: var(--mono);
font-size: 11px;
color: var(--muted);
letter-spacing: 0.08em;
text-transform: uppercase;
margin-top: 4px;
}

/* ─── skills ─── */
.skills-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 12px;
}

.skill-category {
padding: 20px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
transition: border-color .2s;
}
.skill-category:hover { border-color: var(--muted); }

.skill-cat-name {
font-family: var(--mono);
font-size: 11px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--accent);
margin-bottom: 12px;
}

.skill-tags {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.tag {
font-family: var(--mono);
font-size: 11px;
padding: 3px 9px;
background: var(--border);
color: var(--sub);
border-radius: 4px;
letter-spacing: 0.03em;
}

/* ─── experience ─── */
.timeline { display: flex; flex-direction: column; gap: 0; }

.exp-item {
display: grid;
grid-template-columns: 160px 1fr;
gap: 24px;
padding: 28px 0;
border-bottom: 1px solid var(--border);
position: relative;
}
.exp-item:last-child { border-bottom: none; }

.exp-date {
font-family: var(--mono);
font-size: 11px;
color: var(--muted);
letter-spacing: 0.05em;
padding-top: 4px;
}
.exp-current {
display: inline-block;
margin-top: 6px;
background: rgba(108,108,245,0.15);
color: var(--accent);
font-size: 10px;
letter-spacing: 0.08em;
padding: 2px 7px;
border-radius: 4px;
border: 1px solid rgba(108,108,245,0.3);
}

.exp-content {}
.exp-title {
font-family: var(--display);
font-size: 16px;
font-weight: 500;
color: var(--heading);
margin-bottom: 2px;
}
.exp-company {
font-family: var(--mono);
font-size: 12px;
color: var(--accent);
margin-bottom: 10px;
letter-spacing: 0.04em;
}
.exp-desc {
font-size: 14px;
color: var(--sub);
line-height: 1.75;
}
.exp-tech {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 12px;
}

/* ─── projects ─── */
.projects-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}

.project-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 24px;
text-decoration: none;
display: flex;
flex-direction: column;
gap: 12px;
transition: all .22s;
position: relative;
overflow: hidden;
}
.project-card::after {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(ellipse at top left, rgba(108,108,245,0.06), transparent 60%);
opacity: 0;
transition: opacity .3s;
}
.project-card:hover {
border-color: var(--muted);
transform: translateY(-2px);
}
.project-card:hover::after { opacity: 1; }

.project-top {
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.project-icon {
font-size: 20px;
line-height: 1;
}
.project-arrow {
color: var(--muted);
font-size: 16px;
transition: color .2s, transform .2s;
}
.project-card:hover .project-arrow {
color: var(--accent);
transform: translate(2px, -2px);
}

.project-name {
font-family: var(--display);
font-size: 16px;
font-weight: 600;
color: var(--heading);
}
.project-desc {
font-size: 13px;
color: var(--sub);
line-height: 1.65;
flex: 1;
}
.project-tags {
display: flex;
flex-wrap: wrap;
gap: 5px;
margin-top: auto;
}

/* ─── contact ─── */
#contact { padding-bottom: 120px; }

.contact-box {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 48px;
text-align: center;
position: relative;
overflow: hidden;
}
.contact-box::before {
content: '';
position: absolute;
top: -40px; left: 50%;
transform: translateX(-50%);
width: 300px; height: 200px;
background: radial-gradient(ellipse, rgba(108,108,245,0.12), transparent 70%);
pointer-events: none;
}

.contact-heading {
font-family: var(--display);
font-size: 36px;
font-weight: 600;
color: var(--heading);
letter-spacing: -0.02em;
margin-bottom: 12px;
}
.contact-sub {
color: var(--sub);
font-size: 14px;
margin-bottom: 32px;
max-width: 360px;
margin-left: auto;
margin-right: auto;
}

.contact-links {
display: flex;
gap: 12px;
justify-content: center;
flex-wrap: wrap;
}

/* ─── footer ─── */
footer {
border-top: 1px solid var(--border);
padding: 28px 0;
display: flex;
justify-content: space-between;
align-items: center;
}
.footer-copy {
font-family: var(--mono);
font-size: 11px;
color: var(--muted);
letter-spacing: 0.05em;
}
.footer-links {
display: flex;
gap: 20px;
}
.footer-links a {
font-family: var(--mono);
font-size: 11px;
color: var(--muted);
text-decoration: none;
letter-spacing: 0.05em;
transition: color .2s;
}
.footer-links a:hover { color: var(--heading); }

/* ─── scroll reveal ─── */
.reveal {
opacity: 0;
transform: translateY(18px);
transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
opacity: 1;
transform: none;
}

/* ─── responsive ─── */
@media (max-width: 640px) {
.about-grid { grid-template-columns: 1fr; }
.projects-grid { grid-template-columns: 1fr; }
.exp-item { grid-template-columns: 1fr; gap: 6px; }
.contact-box { padding: 32px 24px; }
nav { padding: 16px 20px; }
.nav-links { gap: 16px; }
footer { flex-direction: column; gap: 12px; text-align: center; }
.container { padding: 0 20px; }
.blogs-hero { padding-top: 132px; padding-bottom: 58px; }
.blogs-meta { flex-direction: column; gap: 8px; }
.featured-post { grid-template-columns: 1fr; margin: 38px 0 72px; }
.featured-copy { padding: 28px 24px; min-height: 320px; }
.featured-art { min-height: 240px; }
.blog-toolbar { align-items: start; flex-direction: column; }
.blog-search { width: 100%; }
.blog-grid { grid-template-columns: 1fr; }
.article-nav { padding: 0 20px; }
.article-back, .article-brand, .article-actions { min-width: auto; }
.article-back span { display: none; }
.article-brand { font-size: 19px; }
.article-shell { display: block; padding: 116px 20px 72px; }
.article-sidebar { display: none; }
.article-meta { align-items: flex-start; flex-direction: column; gap: 10px; }
.article-header h1 { margin-top: 32px; font-size: clamp(40px, 13vw, 58px); }
.article-dek { font-size: 17px; }
.listen-bar { grid-template-columns: 46px 48px 1fr; gap: 9px; }
.listen-time { display: none; }
.article-prose { font-size: 17px; line-height: 1.75; }
.article-prose h2 { margin-top: 70px; font-size: 31px; }
.article-prose blockquote { margin: 48px 0; padding-left: 20px; font-size: 23px; }
.article-figure { margin: 50px 0 62px; }
.article-prose pre { padding: 20px; }
.article-next { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
.reveal { opacity: 1; transform: none; }
#typed-text { border-right: none; animation: none; }
}

/* ─── article theme correction ─── */
.article-page {
  background: var(--bg);
  color: var(--text);
}
.article-nav {
  height: auto;
  padding: 20px 28px;
  background: linear-gradient(to bottom, rgba(9,9,9,.96) 60%, transparent);
  border: 0;
  backdrop-filter: blur(4px);
}
.article-nav .nav-links { list-style: none; }
.article-nav .nav-logo,
.article-nav .nav-links a { font-family: var(--mono); }
.article-shell {
  max-width: 980px;
  padding: 148px 28px 110px;
  grid-template-columns: 175px minmax(0, 1fr);
  gap: 64px;
}
.article-sidebar {
  position: sticky;
  top: 104px;
  align-self: start;
  padding-top: 2px;
}
.sidebar-back { margin-bottom: 48px; color: var(--muted); }
.sidebar-back:hover { color: var(--heading); }
.contents-label {
  margin-bottom: 18px;
  color: var(--accent);
  letter-spacing: .14em;
}
.contents-nav { gap: 14px; }
.contents-nav a {
  color: var(--muted);
  font: 11px/1.55 var(--mono);
  letter-spacing: .02em;
  font-style: normal;
}
.contents-nav a:hover,
.contents-nav a.active { color: var(--heading); }
.article-content { min-width: 0; }
.article-header { padding-bottom: 48px; }
.article-meta {
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: .1em;
}
.article-meta span:first-child { color: var(--accent); }
.article-header h1 {
  max-width: 700px;
  margin: 34px 0 16px;
  color: var(--heading);
  font: 600 clamp(40px, 6vw, 64px)/1.04 var(--display);
  letter-spacing: -.045em;
  text-align: left;
}
.article-header h1 em {
  color: var(--accent);
  font-style: normal;
}
.article-dek {
  margin: 0;
  color: var(--sub);
  font: 16px/1.7 var(--sans);
  text-align: left;
}
.article-rule { margin: 30px 0 26px; background: var(--border); }
.listen-bar {
  color: var(--sub);
  font-family: var(--mono);
  letter-spacing: .08em;
}
.listen-button {
  color: var(--accent);
  border-color: var(--border);
}
.listen-button:hover { border-color: var(--accent-dim); color: var(--heading); }
.listen-time { color: var(--muted); }
.article-prose {
  color: var(--sub);
  font: 15px/1.85 var(--sans);
}
.article-prose p { margin-bottom: 24px; }
.article-prose .lead-paragraph { color: var(--text); margin-bottom: 32px; }
.drop-cap {
  margin: 4px 9px 0 0;
  color: var(--accent);
  font: 700 70px/.68 var(--display);
}
.article-prose h2 {
  margin: 68px 0 20px;
  color: var(--heading);
  font: 600 26px/1.2 var(--display);
  letter-spacing: -.025em;
}
.article-prose blockquote {
  margin: 46px 0;
  padding: 6px 0 6px 22px;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font: 500 20px/1.55 var(--display);
}
.equation-card {
  margin: 34px 0;
  padding: 20px 22px;
  border-color: var(--border);
  background: var(--surface);
}
.equation-label,
.equation-note { color: var(--muted); }
.equation-card code { color: var(--accent); font: 14px var(--mono); }
.equation-note { letter-spacing: .02em; }
.article-figure { margin: 48px 0 64px; }
.article-figure img {
  max-height: 390px;
  border: 1px solid var(--border);
  filter: saturate(.65) brightness(.7);
}
.article-figure figcaption { color: var(--muted); font: 11px var(--mono); }
.article-prose ul { color: var(--sub); }
.article-prose pre {
  margin: 34px 0;
  border-color: var(--border);
  background: var(--surface);
}
.article-prose pre code { color: var(--text); }
.article-finish { color: var(--accent); }
.article-footer { margin-top: 72px; padding-top: 30px; }
.article-tags { gap: 10px; color: var(--muted); }
.article-tags span {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--sub);
  letter-spacing: .06em;
}
.article-next-label { margin-top: 62px; color: var(--accent); }
.article-next { color: var(--heading); font: 500 22px var(--display); }
.article-next:hover { color: var(--accent); }
.article-site-footer {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.article-site-footer-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.article-page nav.contents-nav {
  position: static;
  inset: auto;
  z-index: auto;
  padding: 0;
  display: flex;
  justify-content: initial;
  align-items: initial;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

@media (max-width: 640px) {
  .article-nav { padding: 16px 20px; }
  .article-nav .nav-links { gap: 10px; }
  .article-nav .nav-links a { font-size: 10px; }
  .article-shell { padding: 116px 20px 72px; }
  .article-sidebar {
    position: static;
    display: block;
    margin-bottom: 50px;
    padding: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
  }
  .sidebar-back { margin-bottom: 26px; }
  .article-page nav.contents-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
  .article-meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .article-header h1 { margin-top: 28px; font-size: clamp(38px, 12vw, 56px); }
  .article-dek { font-size: 15px; }
  .article-prose { font-size: 15px; }
  .article-prose h2 { margin-top: 58px; font-size: 24px; }
  .article-prose blockquote { font-size: 18px; }
  .article-site-footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}

/* ─── github activity ─── */
.activity-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}
.activity-heading .section-title { margin-bottom: 0; }
.activity-profile {
  padding-bottom: 6px;
  color: var(--sub);
  font: 11px var(--mono);
  letter-spacing: .04em;
  text-decoration: none;
}
.activity-profile:hover { color: var(--accent); }
.github-chart-card {
  display: block;
  margin-top: 28px;
  padding: 24px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color .2s;
}
.github-chart-card:hover { border-color: var(--muted); }
.github-chart-card img {
  display: block;
  width: 100%;
  min-width: 650px;
  height: auto;
}
.markdown-article-page .article-prose a { color: var(--accent); }
.markdown-article-page .article-prose img {
  display: block;
  max-width: 100%;
  margin: 28px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.markdown-article-page .article-prose code {
  padding: 2px 5px;
  background: var(--surface);
  color: var(--accent);
  font: 12px var(--mono);
}
.markdown-article-page .article-prose pre code {
  padding: 0;
  background: transparent;
  color: var(--text);
}
.contents-empty { color: var(--muted); font: 11px var(--mono); }

@media (max-width: 640px) {
  .activity-heading { align-items: start; flex-direction: column; gap: 6px; }
  .activity-profile { padding-bottom: 0; }
  .github-chart-card { margin-top: 22px; padding: 16px; }
}
