:root {
  --bg: #0c1110;
  --panel: #121917;
  --fg: #e7efe8;
  --muted: #8aa093;
  --line: rgba(201, 120, 58, 0.22);
  --copper: #c9783a;
  --green: #3dd68c;
  --ink: #d7e4d9;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Sans SC", "IBM Plex Sans", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
.defs { position: absolute; width: 0; height: 0; }

.scanline {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(0, 0, 0, 0.08) 3px 4px
  );
  opacity: 0.35;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 50;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--copper);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 32px;
  background: rgba(12, 17, 16, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--copper);
  color: var(--copper);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text b { font-size: 20px; font-weight: 700; letter-spacing: 0.08em; }
.logo-text small {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.nav nav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.nav nav a { color: var(--muted); }
.nav nav a.is-on, .nav nav a:hover { color: var(--fg); }
.nav-mail {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--copper);
  border: 1px solid var(--line);
  padding: 8px 12px;
}

.hero {
  position: relative;
  padding: 92px 32px 64px;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}
.eyebrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 22px;
}
.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: blink 2.2s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.hero-name {
  position: relative;
  font-size: clamp(56px, 10vw, 112px);
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--fg);
}
.hero h1, .page h1 {
  position: relative;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0.02em;
  max-width: 16ch;
}
.hero h1.hero-line {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(40px, 7vw, 80px);
  letter-spacing: 0.08em;
}
.page h1.name-xl {
  font-size: clamp(56px, 9vw, 104px);
  letter-spacing: 0.14em;
  max-width: none;
  line-height: 1.05;
}
.lead {
  position: relative;
  max-width: 640px;
  margin-top: 22px;
  color: var(--ink);
  font-size: 18px;
}
.hero-actions {
  position: relative;
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  font-size: 14px;
  border: 1px solid var(--line);
}
.btn.primary { background: var(--copper); color: #1a120c; border-color: var(--copper); }
.btn.ghost:hover { border-color: var(--fg); }
.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.hero-stats strong {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 28px;
  color: var(--copper);
}
.hero-stats span { color: var(--muted); font-size: 13px; }

.fields, .posts, .lab-preview { padding: 28px 32px 72px; }
.sec {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--copper);
}
.sec h2, .block h2 { font-size: 24px; font-weight: 600; }
.more {
  margin-left: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.field {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.field-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  background: #0e1513;
}
.field:hover { transform: translateY(-4px); border-color: var(--copper); }
.field-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--copper);
}
.field h3 { font-size: 22px; }
.field p { color: var(--muted); }
.field ul { margin-top: auto; color: var(--ink); font-size: 14px; padding-left: 16px; }

.post-list { list-style: none; }
.post-list a {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 18px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.post-list time, .post-list span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}
.post-list h3 { font-size: 20px; font-weight: 600; }
.post-list p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.post-list.tall a { grid-template-columns: 110px 1fr 90px; }

.gear {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gear article {
  border: 1px solid var(--line);
  padding: 20px;
  background: var(--panel);
}
.gear h3 { font-size: 15px; margin-bottom: 8px; }
.gear p { color: var(--muted); font-size: 13px; }

.page { padding: 48px 32px 80px; max-width: 980px; }
.block { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.block p { margin-top: 12px; color: var(--ink); }
.spec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.spec div { border: 1px solid var(--line); padding: 16px; background: var(--panel); }
.spec h3 { font-size: 13px; color: var(--copper); font-family: "IBM Plex Mono", monospace; }
.spec p { font-size: 14px; }
.ticks { margin-top: 16px; padding-left: 18px; color: var(--ink); }
.ticks li { margin: 6px 0; }

.lab-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}
.lab-table div { border: 1px solid var(--line); padding: 22px; background: var(--panel); }
.lab-table h2 { font-size: 16px; margin-bottom: 12px; color: var(--copper); }
.lab-table ul { padding-left: 18px; color: var(--ink); }

.about-split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  margin-top: 36px;
}
.portrait {
  border: 1px solid var(--line);
  background: var(--panel);
  min-height: 320px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.chip {
  aspect-ratio: 1.6;
  border: 1px dashed var(--copper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  font-family: "IBM Plex Mono", monospace;
  color: var(--copper);
  letter-spacing: 0.12em;
}
.about-split p + p { margin-top: 14px; color: var(--ink); }
.facts { margin-top: 28px; }
.facts div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.facts dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--muted);
}

.article { padding: 48px 32px 80px; max-width: 760px; margin: 0 auto; }
.article .meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.article h1 { max-width: none; font-size: clamp(28px, 5vw, 44px); }
.article .lead { font-size: 18px; }
.prose { margin-top: 28px; color: var(--ink); }
.prose p, .prose li { margin: 14px 0; }
.prose h2 { margin-top: 32px; font-size: 20px; color: var(--fg); }
.prose ul { padding-left: 18px; }
.doc-fig {
  margin: 22px 0 8px;
  border: 1px solid var(--line);
  background: #0e1513;
}
.doc-fig img {
  width: 100%;
  display: block;
}
.doc-fig figcaption {
  padding: 10px 14px 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.back {
  display: inline-block;
  margin-bottom: 24px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--copper);
}

.foot {
  display: flex;
  justify-content: space-between;
  padding: 24px 32px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .nav { flex-wrap: wrap; padding: 12px 16px; }
  .nav nav { width: 100%; margin: 0; gap: 14px; font-size: 13px; }
  .hero, .fields, .posts, .lab-preview, .page, .article, .foot { padding-left: 16px; padding-right: 16px; }
  .hero-stats, .field-grid, .gear, .spec, .lab-table, .about-split { grid-template-columns: 1fr 1fr; }
  .post-list a, .post-list.tall a { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  .hero-stats, .field-grid, .gear, .spec, .lab-table, .about-split { grid-template-columns: 1fr; }
  .nav-mail { display: none; }
}
