:root {
  --bg: #070d1a;
  --bg-2: #0d1628;
  --line: #1a2640;
  --text: #eef2f9;
  --muted: #97a3bb;
  --dim: #5f6b85;
  --accent: #6ea8ff;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --display: "Inter Tight", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: -20vh -20vw auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; pointer-events: none; z-index: -1; background: radial-gradient(closest-side, rgba(110,168,255,.10), transparent 70%); transform: translate(var(--gx, 0), var(--gy, 0)); transition: transform 1.2s var(--ease); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #07101f; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px; }
.top { display: flex; justify-content: space-between; align-items: center; height: 76px; position: sticky; top: 0; z-index: 10; background: linear-gradient(var(--bg) 60%, transparent); }
.brand { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; }
.top nav { display: flex; gap: 2px; }
.top nav a { font-size: 14px; color: var(--muted); padding: 6px 10px; border-radius: 999px; transition: color .2s, background .2s; }
.top nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
@media (max-width: 520px) { .brand { display: none; } .top nav { margin-left: -10px; } }

/* hero */
.hero { padding: 64px 0 40px; }
.hero.small { padding-bottom: 20px; }
.me { position: relative; width: 112px; height: 112px; margin-bottom: 34px; }
.me img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; filter: grayscale(1) contrast(1.05); transition: filter .6s var(--ease), transform .6s var(--ease); }
.me:hover img { filter: grayscale(0); transform: rotate(-3deg) scale(1.04); }
.me::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px dashed rgba(110,168,255,.45); animation: spin 30s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status { position: absolute; left: 86px; bottom: 6px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); padding: 4px 10px 4px 8px; border-radius: 999px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #5fe08d; box-shadow: 0 0 0 0 rgba(95,224,141,.5); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px transparent; } }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(44px, 9vw, 72px); letter-spacing: -.05em; line-height: .95; margin: 0; }
.role { margin: 14px 0 0; font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .02em; }
.intro { margin: 22px 0 0; font-size: 19px; color: var(--muted); max-width: 56ch; text-wrap: pretty; }
.intro a { color: var(--text); border-bottom: 1px solid var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.soc { font-size: 14px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); transition: color .2s, border-color .2s, transform .3s var(--ease); }
a.soc:hover { color: var(--text); border-color: #33476e; transform: translateY(-2px); }
.soc i { font-style: normal; color: var(--accent); font-size: 12px; }

/* blocks */
.block { padding: 44px 0; border-top: 1px solid var(--line); }
.label { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 0 0 22px; }
.sublabel { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin: 40px 0 10px; }

.now { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.now li { display: flex; justify-content: space-between; gap: 20px; }
.now b { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.now p { margin: 4px 0 0; color: var(--muted); }
.now li > a { color: var(--accent); }

.projects { display: grid; gap: 12px; }
.proj { position: relative; display: block; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); overflow: hidden; transition: border-color .3s, transform .5s var(--ease); }
.proj::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(110,168,255,.12), transparent 50%); opacity: 0; transition: opacity .3s; }
.proj:hover { border-color: #2a3c60; transform: translateY(-3px); }
.proj:hover::before { opacity: 1; }
.p-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.proj h3 { margin: 0; font-family: var(--display); font-size: 26px; letter-spacing: -.035em; }
.p-years { font-family: var(--mono); font-size: 12px; color: var(--dim); white-space: nowrap; }
.p-role { display: block; margin-top: 4px; font-size: 14px; color: var(--accent); }
.proj p { position: relative; margin: 10px 0 0; color: var(--muted); }
.p-go { position: absolute; right: 22px; bottom: 18px; color: var(--dim); transition: color .3s, transform .4s var(--ease); }
.proj:hover .p-go { color: var(--accent); transform: translate(3px, -3px); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: flex; align-items: baseline; gap: 14px; padding: 13px 0; transition: padding .4s var(--ease); }
.list a:hover { padding-left: 8px; }
.list span { font-weight: 500; }
.list em { font-style: normal; color: var(--dim); font-size: 14px; flex: 1; }
.list i, .list time { font-style: normal; color: var(--dim); font-family: var(--mono); font-size: 12px; margin-left: auto; transition: color .2s; }
.list a:hover i, .list a:hover span { color: var(--accent); }
.list .empty { color: var(--dim); padding: 13px 0; border-bottom: 0; }
.writing.big li p { margin: -6px 0 14px; color: var(--muted); font-size: 15px; }
.more { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 14px; }
.more:hover { color: var(--accent); }
@media (max-width: 520px) { .list a { flex-wrap: wrap; gap: 2px 12px; } .list em { flex-basis: 100%; order: 3; } }

.path { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.path::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--accent), var(--line)); }
.path li { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 0 0 24px; }
.path li::before { content: ""; position: absolute; left: -22px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); }
.path li:first-child::before { background: var(--accent); box-shadow: 0 0 12px rgba(110,168,255,.6); }
.yr { font-family: var(--mono); font-size: 13px; color: var(--dim); padding-top: 2px; }
.path b { font-weight: 600; }
.path p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
@media (max-width: 520px) { .path li { grid-template-columns: 1fr; gap: 0; } }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.stack span { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 4px 10px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); }

.contact { text-align: left; padding: 64px 0 80px; }
.contact p { margin: 0 0 10px; color: var(--muted); }
.big-mail { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 6vw, 42px); letter-spacing: -.04em; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .5s var(--ease), color .3s; }
.big-mail:hover { color: var(--accent); background-size: 100% 2px; }

.foot { display: flex; justify-content: space-between; gap: 12px; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.foot b { font-weight: 400; font-family: var(--mono); color: var(--muted); }

/* posts */
.post { padding: 40px 0 70px; }
.back { font-size: 14px; color: var(--muted); }
.back:hover { color: var(--accent); }
.post h1 { font-size: clamp(34px, 7vw, 52px); margin-top: 28px; }
.post > time { display: block; margin-top: 12px; font-family: var(--mono); font-size: 13px; color: var(--dim); }
.prose { margin-top: 36px; font-size: 18px; color: #d8d2d1; }
.prose h2, .prose h3 { font-family: var(--display); letter-spacing: -.03em; color: var(--text); margin: 2em 0 .5em; }
.prose a { color: var(--text); border-bottom: 1px solid var(--accent); }
.prose code { font-family: var(--mono); font-size: .85em; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }
.prose pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose blockquote { margin: 1.5em 0; padding-left: 18px; border-left: 2px solid var(--accent); color: var(--muted); }
.prose img { border-radius: 12px; margin: 1.5em 0; }

/* placeholders — visible until filled in content.py */
mark.todo { background: rgba(255,200,0,.14); color: #ffd34d; border: 1px dashed rgba(255,200,0,.5); border-radius: 4px; padding: 0 4px; font-family: var(--mono); font-size: .85em; }

/* motion */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }
.js h1.split .ch { display: inline-block; opacity: 0; transform: translateY(40%) rotate(6deg); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i) * 28ms); }
.js h1.split.in .ch { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv, .js h1.split .ch { opacity: 1; transform: none; }
}

/* ---------- v2 motion ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 20; background: var(--accent); transform-origin: left; transform: scaleX(var(--sp, 0)); box-shadow: 0 0 10px rgba(110,168,255,.6); }
.hero { position: relative; }
#dots { position: absolute; z-index: -1; top: 0; left: 50%; width: 100vw; height: 100%; translate: -50% 0; pointer-events: none; mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 20%, transparent 75%); }
.me { perspective: 600px; }
.me img { transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); }
.typing { margin: 18px 0 0; font-family: var(--mono); font-size: 14px; color: var(--muted); min-height: 1.6em; }
.typing .prompt { color: var(--dim); }
.typing #type { color: var(--text); }
.caret { display: inline-block; width: 8px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.path::before { transform-origin: top; transform: scaleY(var(--pp, 0)); transition: transform .2s linear; }
.path li::before { transition: background .4s, box-shadow .4s, transform .4s var(--ease); }
.path li.lit::before { background: var(--accent); box-shadow: 0 0 12px rgba(110,168,255,.6); transform: scale(1.15); }
.path li:first-child::before { background: var(--bg); box-shadow: none; }
.path li.lit:first-child::before { background: var(--accent); box-shadow: 0 0 12px rgba(110,168,255,.6); }
.path li b, .path .yr { transition: color .4s; }
.path li.lit .yr { color: var(--accent); }
.big-mail { display: inline-block; transform: translate(var(--bx, 0), var(--by, 0)); transition: transform .5s var(--ease), background-size .5s var(--ease), color .3s; }
.stack span { transition: transform .4s var(--ease), color .2s, border-color .2s; }
.stack span:hover { transform: translateY(-3px); color: var(--text); border-color: #33476e; }
@media (prefers-reduced-motion: reduce) { .path::before { transform: none; } .caret { animation: none; } }
html { overflow-x: clip; }
.now p a, .path p a { color: var(--text); background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: color .2s, background-size .3s var(--ease); }
.now p a:hover, .path p a:hover, .intro a:hover { color: var(--accent); }
.intro a { transition: color .2s; }
.clutch { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; isolation: isolate; transition: transform .5s var(--ease), border-color .3s; }
.clutch::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, var(--accent) 85%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: orbit 5s linear infinite; }
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes orbit { to { --ang: 360deg; } }
.clutch:hover { transform: translateY(-3px); border-color: #2a3c60; }
.c-logo { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.03em; }
.c-sep { width: 1px; height: 20px; background: var(--line); }
.c-stars { color: var(--accent); letter-spacing: 2px; font-size: 14px; }
.c-txt { font-size: 14px; color: var(--muted); }
.c-txt b { color: var(--text); }
.c-go { margin-left: auto; color: var(--dim); transition: color .3s, transform .4s var(--ease); }
.clutch:hover .c-go { color: var(--accent); transform: translate(2px, -2px); }
@media (max-width: 520px) { .c-sep { display: none; } }
.about { font-size: 18px; color: var(--muted); max-width: 60ch; }
.about p { margin: 0 0 18px; }
.about a { color: var(--text); background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: color .2s; }
.about a:hover { color: var(--accent); }
.about + .stack { margin-top: 26px; }
.interests { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 28px; }
.interests span { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-right: 6px; }
.interests b { font-weight: 500; font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); transition: transform .4s var(--ease), border-color .3s, color .3s; }
.interests b:hover { transform: translateY(-3px) rotate(-3deg); border-color: var(--accent); color: var(--accent); }
.words { display: grid; gap: 12px; }
.word { margin: 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); transition: border-color .3s, transform .5s var(--ease); }
.word:hover { border-color: #2a3c60; transform: translateY(-2px); }
.word blockquote { margin: 0; color: #c9d2e3; font-size: 16px; line-height: 1.6; }
.word blockquote::before { content: "“"; display: block; font-family: Georgia, serif; font-size: 40px; line-height: .6; height: 18px; color: var(--accent); }
.word figcaption { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.word img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; filter: grayscale(1); transition: filter .4s; }
.word:hover img { filter: none; }
.word b { display: block; font-weight: 600; font-size: 15px; }
.word em { font-style: normal; font-size: 13px; color: var(--dim); }
.p-head { align-items: center; }
.p-head h3 { flex: 1; }
.p-logo { flex: none; width: 40px; height: 40px; border-radius: 11px; overflow: hidden; display: grid; place-items: center; background: #0b0a0a; border: 1px solid var(--line); transition: transform .5s var(--ease); }
.p-logo img { width: 100%; height: 100%; object-fit: cover; }
.proj:hover .p-logo { transform: rotate(-8deg) scale(1.08); }
.p-role, .proj p { margin-left: 54px; }
@media (max-width: 520px) { .p-role, .proj p { margin-left: 0; } }
.proj p { padding-right: 22px; }
