:root {
  --paper: #f6f4ef;
  --card: #fffdf8;
  --ink: #1b1a17;
  --ink-2: #3d3a34;
  --muted: #706b61;
  --line: #e2ddd2;
  --line-2: #d3cdc0;
  --accent: #d9481f;
  --ok: #1f8a52;
  --serif: "Newsreader", ui-serif, Georgia, serif;
  --sans: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: #f6d2c4; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .15s, color .15s; }
a:hover { text-decoration-color: var(--accent); color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; display: block; }

.page { width: min(100% - 40px, 720px); margin-inline: auto; }
.wide { width: min(100% - 40px, 960px); margin-inline: auto; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 28px 0; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.mark:hover { color: var(--ink); }
.mark-badge { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: italic 500 17px/1 var(--serif); }
.top nav { display: flex; gap: 22px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }

/* Intro */
.intro { padding: 64px 0 36px; }
.intro h1 { font: 500 clamp(44px, 7vw, 64px)/1.02 var(--serif); letter-spacing: -0.025em; margin: 0 0 22px; }
.intro h1 em { color: var(--accent); }
.intro .role { font: 500 15px/1.4 var(--mono); color: var(--muted); margin: 0 0 26px; }
.intro p { font-size: 19px; line-height: 1.6; color: var(--ink-2); margin: 0 0 16px; max-width: 60ch; }
.links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; font-size: 15.5px; }
.links a { font-weight: 500; }
.links .primary { background: var(--ink); color: var(--paper); text-decoration: none; padding: 9px 16px; border-radius: 8px; }
.links .primary:hover { background: var(--accent); color: #fff; }
.links span { display: flex; align-items: center; gap: 20px; }

/* Status page: the signature element */
.status { margin: 28px 0 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 12px 32px -20px rgba(60, 40, 10, .25); }
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #eef7f1; }
.status-head strong { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #145c37; }
.status-head small { font: 12.5px var(--mono); color: #4d7a60; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 0 rgba(31,138,82,.5); animation: ping 2.4s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(31,138,82,0); } 100% { box-shadow: 0 0 0 0 rgba(31,138,82,0); } }
.status ul { list-style: none; margin: 0; padding: 4px 0; }
.status li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: baseline; padding: 11px 20px; }
.status li + li { border-top: 1px dashed var(--line); }
.status li b { font-weight: 500; }
.status li p { grid-column: 1; margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.pill { grid-column: 2; grid-row: 1; font: 500 12.5px var(--mono); color: var(--ok); white-space: nowrap; }
.pill.blue { color: #2a62c9; }
.pill.hot { color: var(--accent); }
.status-foot { padding: 10px 20px; border-top: 1px solid var(--line); font: 12.5px var(--mono); color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Sections */
section { padding: 56px 0 8px; }
.label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.label h2 { font: 500 28px/1.2 var(--serif); letter-spacing: -0.015em; margin: 0; }
.label a { font-size: 14.5px; color: var(--muted); }

/* Writing list */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li a { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 14px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.posts li:last-child a { border-bottom: 0; }
.posts .t { font-weight: 500; font-size: 18px; line-height: 1.4; }
.posts .d { font: 13px var(--mono); color: var(--muted); padding-top: 4px; }
.posts .x { grid-column: 1; color: var(--muted); font-size: 15.5px; }
.posts li a:hover .t { color: var(--accent); }

/* Work */
.jobs { list-style: none; margin: 0; padding: 0; }
.jobs > li { display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding: 16px 0; }
.jobs > li + li { border-top: 1px solid var(--line); }
.when { font: 13px/1.9 var(--mono); color: var(--muted); }
.jobs h3 { font-size: 17px; font-weight: 600; margin: 0; }
.jobs h3 span { font-weight: 400; color: var(--muted); }
.jobs p { margin: 6px 0 0; color: var(--ink-2); }
.jobs ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); }
.jobs ul li { margin-bottom: 6px; }
.jobs ul li::marker { color: var(--accent); }
.first { display: inline-block; font: 500 12px var(--mono); color: var(--accent); background: #fbe5dc; padding: 2px 8px; border-radius: 6px; margin-left: 6px; vertical-align: 2px; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.proj { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
a.proj:hover { color: inherit; transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 16px 34px -22px rgba(60, 40, 10, .45); }
.shot { aspect-ratio: 16 / 9; display: grid; place-items: center; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.proj-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.proj h3 { margin: 0; font-size: 17px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.proj h3 span { font: 400 13px var(--mono); color: var(--muted); }
.proj p { margin: 0; font-size: 15.5px; color: var(--ink-2); line-height: 1.55; }
.proj .stack { margin-top: auto; padding-top: 10px; font: 12.5px var(--mono); color: var(--muted); }

.shot-ai { background: #f1efe8; }
.shot-ai svg { width: 92%; height: auto; }
.shot-ai .wire { fill: none; stroke: #b9b2a3; stroke-width: 1.3; }
.shot-ai .n rect { fill: #fffdf8; stroke: #cfc8b9; }
.shot-ai .n text { font: 500 11.5px var(--mono); fill: var(--ink-2); text-anchor: middle; }
.shot-ai .hub rect { fill: var(--ink); stroke: var(--ink); }
.shot-ai .hub text { fill: var(--paper); }
.shot-ai .mesh { fill: none; stroke: #c9c2b2; stroke-dasharray: 3 5; }
.shot-ai .ml { font: 10.5px var(--mono); fill: #9a9384; }
.shot-ai .pk { fill: var(--accent); }

.shot-pilotik { background: radial-gradient(circle at 50% 40%, #ffe1ec, #fde9f0 60%, #fbdce8); }
.shot-pilotik img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 18px 30px -12px rgba(230, 40, 110, .45); }
.shot-pilotik small { position: absolute; bottom: 16px; font: 600 11px var(--sans); letter-spacing: .18em; color: #c0577d; }

.shot-blokhaus { background: #1a1b2e; }
.shot-blokhaus .wm { font: 900 44px/1 var(--sans); letter-spacing: -0.03em; }
.shot-blokhaus .wm b { color: #ffd60a; font-weight: 900; }
.shot-blokhaus .wm i { color: #ff2d78; font-style: normal; }
.shot-blokhaus .grid { position: absolute; display: grid; grid-template-columns: repeat(3, 14px); gap: 3px; }
.shot-blokhaus .grid i { width: 14px; height: 14px; border-radius: 3px; background: var(--c, transparent); }
.shot-blokhaus .g1 { top: 18px; left: 22px; }
.shot-blokhaus .g2 { bottom: 18px; right: 22px; }

.shot-gratonite { background: #6d28d9; }
.chat { width: 70%; display: flex; flex-direction: column; gap: 7px; }
.chat span { align-self: flex-start; font: 13px/1.3 var(--sans); padding: 7px 12px; border-radius: 14px 14px 14px 4px; background: rgba(255,255,255,.16); color: #fff; }
.chat span.me { align-self: flex-end; background: #fff; color: #4c1d95; border-radius: 14px 14px 4px 14px; }

/* Contact */
.contact { margin: 64px 0 0; padding: 36px; background: var(--ink); color: var(--paper); border-radius: 16px; }
.contact h2 { font: 500 34px/1.15 var(--serif); letter-spacing: -0.02em; margin: 0 0 10px; }
.contact h2 em { color: #ff8a65; }
.contact p { margin: 0 0 22px; color: #cfc9bd; }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; }
.contact a, .copy { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 9px; border: 1px solid #45423b; color: var(--paper); text-decoration: none; font: 500 15px var(--sans); background: transparent; cursor: pointer; }
.contact a:hover, .copy:hover { border-color: #8a8476; color: #fff; }
.contact a.go { background: #ff8a65; border-color: #ff8a65; color: #1b1a17; }
.contact a.go:hover { background: #fff; border-color: #fff; color: #1b1a17; }
.copy em { font: 12px var(--mono); font-style: normal; color: #a7a091; }
.copy.done em { color: #7ee2a8; }

footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 36px 0 48px; font-size: 14px; color: var(--muted); }
footer nav { display: flex; gap: 18px; }

/* Article */
.post-head { padding: 48px 0 8px; }
.post-head .meta { font: 13px var(--mono); color: var(--muted); margin: 0 0 14px; }
.post-head h1 { font: 500 clamp(34px, 5.5vw, 48px)/1.1 var(--serif); letter-spacing: -0.02em; margin: 0 0 18px; }
.post-head .dek { font-size: 19px; color: var(--ink-2); margin: 0; }
.prose { font: 400 20px/1.7 var(--serif); color: #24221e; padding: 18px 0 24px; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font: 600 21px/1.35 var(--sans); letter-spacing: -0.01em; margin: 2em 0 .6em; }
.prose a { text-decoration-color: var(--accent); }
.prose blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--accent); font-style: italic; color: var(--ink-2); }
.back { font-size: 15px; color: var(--muted); }

@media (max-width: 700px) {
  body { font-size: 16.5px; }
  .top nav { gap: 16px; }
  .intro { padding-top: 36px; }
  .jobs > li { grid-template-columns: 1fr; gap: 2px; }
  .projects { grid-template-columns: 1fr; }
  .status li { grid-template-columns: 1fr; }
  .pill { grid-column: 1; grid-row: auto; }
  .contact { padding: 28px 22px; }
  .posts li a { grid-template-columns: 1fr; }
  .posts .d { grid-row: 1; padding: 0; }
  .prose { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } .shot-ai .pk { display: none; } a.proj:hover { transform: none; } }
@media print { .top nav, .contact, .status { display: none; } }
