@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/syne-700.woff2") format("woff2");
}

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/syne-800.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plex-400.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/plex-500.woff2") format("woff2");
}

:root {
  --bg: #0e0f0c;
  --bg-raise: #161814;
  --ink: #f4f1ea;
  --muted: #c9c4b8;
  --line: rgba(244, 241, 234, 0.14);
  --accent: #d6ff4a;
  --accent-ink: #14160c;
  --serif: "Songti SC", "STSongti-SC-Regular", "Noto Serif SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --display: "Syne", "PingFang SC", sans-serif;
  --nav-h: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(214, 255, 74, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

body.js { scroll-behavior: smooth; }

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  text-decoration: none;
}

.skip:focus { top: 12px; }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.spotlight {
  position: fixed;
  z-index: 4;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(214, 255, 74, 0.11), transparent 64%);
  mix-blend-mode: screen;
}

.grain {
  position: fixed;
  inset: -20%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: var(--bg);
  animation: boot-out 0.45s ease 0.7s forwards;
}

.boot-inner { text-align: center; }

.boot strong {
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.boot i {
  display: block;
  height: 2px;
  width: 0;
  margin: 14px auto 0;
  background: var(--accent);
  animation: boot-bar 0.7s ease forwards;
}

@keyframes boot-bar { to { width: 12rem; } }

@keyframes boot-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 6vw;
}

.nav.scrolled {
  background: rgba(14, 15, 12, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

main,
.marquee,
.footer {
  position: relative;
  z-index: 3;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-decoration: none;
}

.brand small {
  color: var(--accent);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.nav-links {
  display: flex;
  gap: 26px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }

.nav-links a.active::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 6px 12px;
  cursor: pointer;
}

.wrap {
  width: min(1120px, calc(100% - 12vw));
  margin-inline: auto;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 28px) 0 36px;
  overflow: hidden;
}

#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-frame {
  position: absolute;
  z-index: 2;
  top: calc(var(--nav-h) + 8px);
  right: 16px;
  bottom: 16px;
  left: 16px;
  pointer-events: none;
}

.hero-frame span {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(214, 255, 74, 0.85);
}

.hero-frame .tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hero-frame .tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hero-frame .bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hero-frame .br { right: 0; bottom: 0; border-left: 0; border-top: 0; }

.hero-copy { position: relative; z-index: 2; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.eyebrow time { color: var(--ink); }

.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(214, 255, 74, 0.7);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(214, 255, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(214, 255, 74, 0); }
}

.hero-title {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 28px 40px;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4.4rem, 10vw, 7.8rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.05em;
}

.role {
  margin: 0 0 0.4rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.hero-lead {
  max-width: 40rem;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.langs-label {
  margin: 22px 0 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.langs li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 148px;
  padding: 10px 14px 12px;
  border: 1px solid rgba(214, 255, 74, 0.45);
  background: rgba(14, 15, 12, 0.55);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.langs span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 36px 0 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.stat {
  margin: 0;
  padding: 16px 18px 18px;
  background: rgba(14, 15, 12, 0.78);
  backdrop-filter: blur(10px);
}

.stat dt {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.stat .num {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stats-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #10120e;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: ticker 32s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-group {
  display: flex;
  flex: none;
  gap: 28px;
  padding: 14px 28px 14px 0;
}

.marquee-group span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.marquee-group span::before {
  content: "▹ ";
  color: var(--accent);
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

.section {
  padding: 96px 0;
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

.kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}

.kicker span {
  margin-right: 10px;
  color: var(--accent);
}

h2 {
  max-width: 16em;
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.25;
}

.edu-title {
  max-width: none;
}

.edu-title span {
  display: block;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 40px;
}

.about-grid p,
.timeline p,
.project p,
.card p {
  margin: 0;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  border: 1px solid var(--line);
  padding: 6px 10px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.bento {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-areas:
    "agent rag java"
    "agent data sre";
  gap: 12px;
}

.card {
  position: relative;
  min-height: 210px;
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.card.agent {
  grid-area: agent;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(214, 255, 74, 0.16), transparent 62%),
    rgba(255, 255, 255, 0.02);
}

.signal {
  display: grid;
  margin: auto 0 0;
  padding: 22px 0 0;
  list-style: none;
}

.signal li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.card.rag { grid-area: rag; }
.card.java { grid-area: java; }
.card.data { grid-area: data; }
.card.sre { grid-area: sre; }

.card .idx {
  margin: 0 0 28px;
  color: var(--accent);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.card h3,
.timeline h3,
.project h3,
.edu strong {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 28px;
  padding: 32px 12px;
  border-top: 1px solid var(--line);
  transition: background 0.3s ease;
}

.timeline li:last-child { border-bottom: 1px solid var(--line); }

.when {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.projects { border-top: 1px solid var(--line); }

.project {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px 24px;
  padding: 32px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.35s ease, color 0.35s ease;
}

.project-index {
  margin: 0;
  color: var(--accent);
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 10px;
}

.project-head h3 { margin: 0; }

.project ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.project li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
}

.project li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.edu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.edu li {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 28px;
  padding: 22px 12px;
  border-top: 1px solid var(--line);
}

.edu li:last-child { border-bottom: 1px solid var(--line); }

.edu p { margin: 0; }

.edu span {
  margin-left: 12px;
  color: var(--muted);
}

.footer {
  padding: 48px 0 72px;
}

.footer-mark {
  margin: 0 0 12px;
  color: transparent;
  font-family: var(--display);
  font-size: clamp(4.5rem, 14vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.8;
  -webkit-text-stroke: 1px rgba(214, 255, 74, 0.85);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 48px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.contact li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.contact span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact a {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.98rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(214, 255, 74, 0.55);
  overflow-wrap: anywhere;
}

.contact a:hover { color: var(--accent); }

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    border-color: rgba(214, 255, 74, 0.75);
    transform: translateY(-3px);
  }

  .timeline li:hover {
    background: linear-gradient(90deg, rgba(214, 255, 74, 0.08), transparent 70%);
  }

  .project:hover {
    background: var(--accent);
    color: var(--accent-ink);
  }

  .project:hover .project-index,
  .project:hover h3,
  .project:hover .when,
  .project:hover p,
  .project:hover li {
    color: var(--accent-ink);
  }

  .project:hover li::before { background: var(--accent-ink); }
}

@media (max-width: 860px) {
  .bento {
    grid-template-columns: 1fr;
    grid-template-areas:
      "agent"
      "rag"
      "java"
      "data"
      "sre";
  }

  .card { min-height: 0; }

  .about-grid,
  .timeline li,
  .edu li,
  .hero-title {
    grid-template-columns: 1fr;
  }

  .role { margin-bottom: 0; }
}

@media (max-width: 720px) {
  .brand { font-size: 0.92rem; }

  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: calc(100% + 6px);
    right: 6vw;
    display: none;
    flex-direction: column;
    gap: 0;
    min-width: 168px;
    padding: 8px;
    border: 1px solid var(--line);
    background: rgba(16, 18, 14, 0.96);
  }

  .nav-links.open { display: flex; }

  .nav-links a { padding: 10px 12px; }

  .langs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .langs li {
    flex: 0 0 auto;
    padding: 10px 12px;
    font-size: 1rem;
    white-space: nowrap;
  }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .stat { min-width: 0; padding: 14px 12px 16px; }

  .stat .num {
    font-size: 1.35rem;
    letter-spacing: -0.05em;
    white-space: nowrap;
  }

  .project { grid-template-columns: 1fr; padding-inline: 0; }

  .section { padding: 72px 0; }

  h1 {
    font-size: clamp(2.9rem, 13.2vw, 4.6rem);
    letter-spacing: -0.05em;
  }
}

@media (pointer: coarse) {
  .spotlight { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .boot { display: none; }

  .live,
  .marquee-track { animation: none; }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .card:hover { transform: none; }
}
