:root {
    --bg: #09090a;
    --bg-2: #0d0d0f;
    --panel: #121214;
    --panel-2: #17171a;
    --line: #232327;
    --line-2: #303037;
    --text: #ededef;
    --dim: #a6a6ae;
    --muted: #66666e;
    --green: #3ddc84;
    --green-soft: rgba(61,220,132,.10);
    --silver: #c4c8d0;
    --silver-soft: rgba(196,200,208,.08);
    --red: #ff6b6b;
    --mono: 'JetBrains Mono', monospace;
    --sans: 'Inter', sans-serif;
    --disp: 'Space Grotesk', sans-serif;
    --radius: 14px;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6; overflow-x: hidden; }
  ::selection { background: var(--green); color: #06110b; }

  /* ---------- background ---------- */
  .grid-bg {
    position: fixed; inset: 0; z-index: -2;
    background-image:
      linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
  }
  .glow { position: fixed; z-index: -1; border-radius: 50%; filter: blur(130px); opacity: .4; pointer-events: none; }
  .glow-1 { width: 460px; height: 460px; background: rgba(61,220,132,.07); top: -160px; right: -100px; }
  .glow-2 { width: 400px; height: 400px; background: rgba(196,200,208,.05); bottom: 8%; left: -140px; }

  #progress { position: fixed; top: 0; left: 0; height: 2px; width: 0%;
    background: linear-gradient(90deg, var(--green), var(--silver)); z-index: 100; }

  .wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

  /* ---------- nav ---------- */
  nav { position: fixed; top: 0; left: 0; right: 0; z-index: 90;
    background: rgba(9,9,10,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); }
  .nav-inner { max-width: 1080px; margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .logo { font-family: var(--mono); font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none; white-space: nowrap; }
  .logo span { color: var(--green); }
  .nav-links { display: flex; gap: 26px; align-items: center; }
  .nav-links a { color: var(--dim); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
  .nav-links a:hover, .nav-links a.active { color: var(--green); }
  .btn { display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 13px; font-weight: 500;
    padding: 9px 18px; border-radius: 8px; text-decoration: none;
    transition: all .2s; cursor: pointer; border: 1px solid transparent; }
  .btn-solid { background: var(--green); color: #06110b; }
  .btn-solid:hover { background: #52e695; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(61,220,132,.22); }
  .btn-ghost { border-color: var(--line-2); color: var(--text); }
  .btn-ghost:hover { border-color: var(--green); color: var(--green); }
  .menu-btn { display: none; background: none; border: 1px solid var(--line-2); color: var(--text);
    border-radius: 8px; padding: 8px 10px; font-family: var(--mono); cursor: pointer; }

  /* ---------- hero ---------- */
  header { padding: 150px 0 70px; }
  .hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
  .status { display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 12.5px; color: var(--green);
    background: var(--green-soft); border: 1px solid rgba(61,220,132,.22);
    padding: 6px 14px; border-radius: 100px; margin-bottom: 26px; }
  .status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
  @keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(61,220,132,.5); } 50% { box-shadow: 0 0 0 6px rgba(61,220,132,0); } }
  h1 { font-family: var(--disp); font-size: clamp(37px, 5.2vw, 58px);
    line-height: 1.08; font-weight: 700; letter-spacing: -1.5px; margin-bottom: 22px; }
  h1 .hl { color: var(--green); }
  h1 .sv { color: var(--silver); }
  .hero p.lead { color: var(--dim); font-size: 17px; max-width: 490px; margin-bottom: 34px; }
  .hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
  .hero-meta { display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
  .hero-meta span b { color: var(--dim); font-weight: 500; }

  /* terminal */
  .term { background: #0b0b0d; border: 1px solid var(--line-2); border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03);
    overflow: hidden; font-family: var(--mono); font-size: 13.5px; }
  .term-bar { display: flex; align-items: center; gap: 8px;
    padding: 12px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
  .term-bar .d { width: 11px; height: 11px; border-radius: 50%; }
  .term-bar .d1 { background: #ff5f56; } .term-bar .d2 { background: #ffbd2e; } .term-bar .d3 { background: #27c93f; }
  .term-bar .title { margin-left: auto; margin-right: auto; color: var(--muted); font-size: 12px; }
  .term-body { padding: 20px 22px 24px; min-height: 300px; }
  .term-body .ln { margin-bottom: 6px; white-space: pre-wrap; word-break: break-word; }
  .term-body .prompt { color: var(--green); }
  .term-body .cmd { color: var(--text); }
  .term-body .out { color: var(--dim); }
  .term-body .ok { color: var(--green); }
  .term-body .sv { color: var(--silver); }
  .cursor { display: inline-block; width: 8px; height: 15px; background: var(--green); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }

  /* ---------- ticker ---------- */
  .ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    background: var(--bg-2); overflow: hidden; padding: 14px 0; }
  .ticker-track { display: flex; gap: 48px; width: max-content; animation: scroll 36s linear infinite; }
  .ticker-track span { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
  .ticker-track span::before { content: '◆'; color: var(--green); margin-right: 12px; font-size: 9px; vertical-align: 1px; }
  @keyframes scroll { to { transform: translateX(-50%); } }

  /* ---------- sections ---------- */
  section { padding: 96px 0; }
  .sec-tag { font-family: var(--mono); font-size: 13px; color: var(--green); margin-bottom: 14px; display: block; }
  h2 { font-family: var(--disp); font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -1px; font-weight: 700; margin-bottom: 14px; }
  .sec-sub { color: var(--dim); max-width: 600px; margin-bottom: 48px; }
  .alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

  /* stats */
  .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .stat { background: var(--panel); padding: 30px 26px; transition: background .3s; }
  .stat:hover { background: var(--panel-2); }
  .stat .num { font-family: var(--disp); font-size: 38px; font-weight: 700; color: var(--green); letter-spacing: -1px; }
  .stat .num .u { font-size: 20px; color: var(--silver); }
  .stat .lbl { font-size: 13px; color: var(--muted); margin-top: 4px; font-family: var(--mono); }
  .stats-link { text-decoration: none; color: inherit; display: grid; transition: border-color .3s; }
  .stats-link:hover { border-color: var(--line-2); }
  .stats-cta { text-align: center; margin-top: 18px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
  .stats-cta a { color: var(--green); text-decoration: none; border-bottom: 1px solid rgba(61,220,132,.35); }
  .stats-cta a:hover { border-bottom-color: var(--green); }

  /* philosophy */
  .phil-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .phil { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px; transition: border-color .3s, transform .3s; }
  .phil:hover { border-color: var(--line-2); transform: translateY(-3px); }
  .phil .idx { font-family: var(--mono); font-size: 12px; color: var(--silver); }
  .phil h3 { font-family: var(--disp); font-size: 20px; margin: 12px 0 10px; font-weight: 600; }
  .phil p { color: var(--dim); font-size: 14.5px; }

  /* systems */
  .sys-grid { display: grid; gap: 22px; }
  .sys { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 36px; position: relative; overflow: hidden; transition: border-color .3s, transform .3s; }
  .sys::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--green), transparent 60%); opacity: 0; transition: opacity .3s; }
  .sys:hover { border-color: var(--line-2); transform: translateY(-3px); }
  .sys:hover::before { opacity: 1; }
  .sys-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
  .sys .kind { font-family: var(--mono); font-size: 11.5px; color: var(--silver); letter-spacing: .8px; }
  .sys .kind .cn { color: var(--muted); }
  .sys h3 { font-family: var(--disp); font-size: 24px; font-weight: 600; margin: 10px 0 12px; }
  .sys .brief { color: var(--dim); font-size: 15px; max-width: 660px; margin-bottom: 20px; }
  .sys .brief b { color: var(--text); font-weight: 600; }
  .sys .metric { text-align: right; min-width: 130px; flex: none; }
  .sys .metric .v { font-family: var(--disp); font-size: 34px; font-weight: 700; color: var(--green); letter-spacing: -1px; }
  .sys .metric .k { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
  .hard-title { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
  .sys ul { list-style: none; display: grid; gap: 9px; margin-bottom: 22px; max-width: 720px; }
  .sys li { color: var(--dim); font-size: 14px; padding-left: 22px; position: relative; }
  .sys li::before { content: '▹'; position: absolute; left: 0; color: var(--green); }
  .sys li b { color: var(--text); font-weight: 600; }
  .tags { display: flex; flex-wrap: wrap; gap: 8px; }
  .tag { font-family: var(--mono); font-size: 11.5px; color: var(--dim);
    background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }
  .eco-line { margin-top: 30px; padding: 18px 22px; border: 1px dashed var(--line-2); border-radius: var(--radius);
    font-size: 13.5px; color: var(--muted); font-family: var(--mono); }
  .eco-line b { color: var(--dim); font-weight: 500; }

  /* platform diagram */
  .board { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 34px; margin: 6px 0 56px; }
  .lane { margin-bottom: 34px; }
  .lane:last-child { margin-bottom: 0; }
  .lane-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2px; color: var(--muted);
    text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
  .lane-tag .sw { width: 9px; height: 9px; border-radius: 2px; }
  .flow { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; row-gap: 18px; }
  .node { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px;
    padding: 12px 16px; font-size: 12.5px; font-weight: 500; color: var(--dim);
    display: flex; flex-direction: column; justify-content: center; min-width: 118px; position: relative;
    text-align: center; line-height: 1.35; }
  .node small { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 3px; }
  .node.mine { background: #16211b; border-color: rgba(61,220,132,.45); color: var(--text);
    box-shadow: 0 10px 26px rgba(0,0,0,.35); }
  .node.mine small { color: var(--green); }
  .node.mine::after { content: 'MINE'; position: absolute; top: -9px; right: -8px;
    font-family: var(--mono); font-size: 8.5px; font-weight: 600; letter-spacing: 1px;
    background: var(--green); color: #09090a; padding: 2px 7px; border-radius: 100px; }
  .node.fleet { border-style: dashed; border-color: rgba(196,200,208,.5); color: var(--silver);
    background: rgba(196,200,208,.05); }
  .pipe { flex: 1 1 34px; min-width: 34px; position: relative; align-self: center; height: 2px;
    background-image: linear-gradient(90deg, var(--line-2) 55%, transparent 45%); background-size: 9px 2px; }
  .pipe::after { content: ''; position: absolute; right: -1px; top: -4px;
    border: 5px solid transparent; border-left-color: var(--line-2); }
  .pipe .pkt { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%;
    background: var(--silver); animation: travel 3.2s linear infinite; }
  .lane.data .pipe .pkt { background: var(--green); animation-duration: 2.6s; }
  @keyframes travel { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
  .board-note { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line-2);
    font-size: 13.5px; color: var(--dim); display: flex; gap: 10px; align-items: baseline; }
  .board-note .mono { font-family: var(--mono); font-size: 11px; color: var(--green); white-space: nowrap; }

  /* career git log */
  .xp { border-left: 1px solid var(--line-2); margin-left: 8px; padding-left: 38px; position: relative; }
  .xp-item { position: relative; padding-bottom: 52px; }
  .xp-item:last-child { padding-bottom: 0; }
  .xp-item::before { content: ''; position: absolute; left: -45px; top: 6px;
    width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 3px solid var(--green); }
  .xp-item.past::before { border-color: var(--line-2); }
  .commit { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 6px; }
  .commit .hash { color: var(--silver); }
  .commit .ref { color: var(--green); }
  .xp-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
  .xp-head h3 { font-family: var(--disp); font-size: 21px; font-weight: 600; }
  .xp-head .when { font-family: var(--mono); font-size: 12.5px; color: var(--silver); }
  .xp .org { color: var(--dim); font-size: 14px; margin-bottom: 16px; font-weight: 500; }
  .xp ul { list-style: none; display: grid; gap: 10px; }
  .xp li { color: var(--dim); font-size: 14.5px; padding-left: 24px; position: relative; }
  .xp li::before { content: '▹'; position: absolute; left: 0; color: var(--green); }
  .xp li b { color: var(--text); font-weight: 600; }

  /* stack */
  .stack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stack-cat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: border-color .3s; }
  .stack-cat:hover { border-color: var(--line-2); }
  .stack-cat h4 { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--silver); margin-bottom: 16px; }
  .stack-cat h4::before { content: '$ '; color: var(--green); }

  /* awards */
  .awards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .award { background: linear-gradient(160deg, var(--panel) 0%, var(--panel-2) 100%);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
    position: relative; overflow: hidden; transition: border-color .3s, transform .3s; }
  .award:hover { border-color: rgba(196,200,208,.4); transform: translateY(-3px); }
  .award .trophy { font-size: 30px; margin-bottom: 16px; display: block; }
  .award h3 { font-family: var(--disp); font-size: 19px; font-weight: 600; margin-bottom: 10px; }
  .award p { color: var(--dim); font-size: 14px; }
  .award .ribbon { position: absolute; top: 20px; right: -34px; transform: rotate(45deg);
    background: var(--silver-soft); color: var(--silver);
    font-family: var(--mono); font-size: 10px; padding: 4px 40px; border: 1px solid rgba(196,200,208,.25); }

  /* contact */
  .contact { text-align: center; padding: 110px 0 90px; }
  .contact h2 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 18px; }
  .contact .sub { color: var(--dim); max-width: 480px; margin: 0 auto 40px; }
  .contact-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
  .contact .joke { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

  footer { border-top: 1px solid var(--line); padding: 28px 0; }
  .foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
    font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

  .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.in { opacity: 1; transform: none; }

  /* ---------- responsive ---------- */
  @media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 44px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .phil-grid, .stack-grid, .awards { grid-template-columns: 1fr; }
    .sys .metric { text-align: left; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0;
      background: var(--bg-2); border-bottom: 1px solid var(--line);
      flex-direction: column; padding: 18px 24px; gap: 18px; align-items: flex-start; }
    .nav-links.open { display: flex; }
    .menu-btn { display: block; }
    header { padding-top: 120px; }
  }

/* ---------- multi-page additions ---------- */
/* subpage header */
.page-head { padding: 140px 0 10px; }
.page-head .crumb { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 18px; display: block; }
.page-head .crumb a { color: var(--muted); text-decoration: none; }
.page-head .crumb a:hover { color: var(--green); }
.page-head .crumb .sep { margin: 0 8px; color: var(--line-2); }

/* systems teasers on home */
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.teaser {
  display: flex; flex-direction: column; gap: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; text-decoration: none; position: relative; overflow: hidden;
  transition: border-color .3s, transform .3s;
}
.teaser::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--green), transparent 60%); opacity: 0; transition: opacity .3s; }
.teaser:hover { border-color: var(--line-2); transform: translateY(-3px); }
.teaser:hover::before { opacity: 1; }
.teaser .kind { font-family: var(--mono); font-size: 10.5px; color: var(--silver); letter-spacing: .8px; }
.teaser h3 { font-family: var(--disp); font-size: 20px; font-weight: 600; margin: 10px 0 8px; color: var(--text); }
.teaser p { color: var(--dim); font-size: 13.5px; margin-bottom: 18px; }
.teaser .metric { font-family: var(--disp); font-size: 30px; font-weight: 700; color: var(--green); letter-spacing: -1px; margin-bottom: 14px; }
.teaser .metric small { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; display: block; }
.teaser .more { margin-top: auto; font-family: var(--mono); font-size: 12px; color: var(--green); }
.teaser .more::after { content: ' →'; transition: margin-left .2s; }
.teaser:hover .more::after { margin-left: 4px; }

/* CTA strip on subpages */
.cta-strip { margin: 20px 0 0; padding: 34px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.cta-strip h3 { font-family: var(--disp); font-size: 24px; font-weight: 600; margin-bottom: 10px; }
.cta-strip p { color: var(--dim); font-size: 14.5px; margin-bottom: 22px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* back-home git line */
.back-line { text-align: center; margin-top: 60px; font-family: var(--mono); font-size: 14px; }
.back-line a { color: var(--green); text-decoration: none; border-bottom: 1px solid rgba(61,220,132,.35); }
.back-line a:hover { border-bottom-color: var(--green); }

@media (max-width: 900px) {
  .teaser-grid { grid-template-columns: 1fr; }
  .page-head { padding-top: 116px; }
  .flow { flex-direction: column; align-items: stretch; }
  .pipe { width: 2px; min-width: 2px; height: 30px; flex: none; margin: 0 auto;
    background-image: linear-gradient(180deg, var(--line-2) 55%, transparent 45%); background-size: 2px 9px; }
  .pipe::after { right: -4px; top: auto; bottom: -1px; border: 5px solid transparent; border-top-color: var(--line-2); }
  .pipe .pkt { left: -3px; animation: traveldown 2.8s linear infinite; }
  @keyframes traveldown { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: calc(100% - 8px); opacity: 0; } }
}
