:root {
  --bg: #0b0f14;
  --surface: #111820;
  --surface-2: #17212c;
  --text: #e8eef4;
  --muted: #a3b0c0;
  --line: rgba(148,163,184,.18);
  --accent: #22d3ee;
  --accent-2: #38bdf8;
  --success: #34d399;
  --shadow: 0 28px 72px rgba(0,0,0,.32);
  --max: 1180px;
}

[data-theme="light"] {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #e9edf1;
  --text: #121820;
  --muted: #596677;
  --line: rgba(10,18,28,.13);
  --accent: #087e8b;
  --accent-2: #0369a1;
  --success: #15803d;
  --shadow: 0 24px 70px rgba(25,35,45,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  transition: color .25s ease, background .25s ease;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .035; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E"); }
.cursor-glow { position: fixed; left: var(--mouse-x, 50vw); top: var(--mouse-y, 30vh); width: 480px; height: 480px; translate: -50% -50%; border-radius: 50%; pointer-events: none; z-index: -1; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 10%, transparent), transparent 68%); filter: blur(14px); }
.grid-backdrop { position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: .2; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 54px 54px; mask-image: linear-gradient(to bottom, black, transparent 76%); }
.section-shell { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.site-header { height: 76px; width: min(calc(100% - 48px), var(--max)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 760; letter-spacing: .02em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; }
.brand-mark img { display: block; width: 100%; height: 100%; border-radius: 9px; box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 12%, transparent); }
.site-header nav { display: flex; gap: 30px; font-size: 14px; color: var(--muted); }
.site-header nav a { transition: color .2s ease; }
.site-header nav a:hover { color: var(--text); }
.mobile-nav { display: none; }
.theme-toggle { width: 38px; height: 38px; color: var(--text); background: transparent; border: 1px solid var(--line); cursor: pointer; font-size: 18px; }
.hero { min-height: 760px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 54px; align-items: center; padding: 88px 0 100px; position: relative; isolation: isolate; }
.hero::before { content: ""; position: absolute; width: 420px; height: 420px; right: 7%; top: 14%; border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent); border-radius: 50%; box-shadow: 0 0 80px color-mix(in srgb, var(--accent-2) 8%, transparent), inset 0 0 80px color-mix(in srgb, var(--accent) 5%, transparent); animation: breathe 4s ease-in-out infinite; z-index: -1; }
.hero-ghost { position: absolute; left: -2vw; bottom: 1%; color: transparent; -webkit-text-stroke: 1px var(--line); font: 900 clamp(90px, 16vw, 230px)/.8 Arial Black, sans-serif; letter-spacing: -.08em; opacity: .45; z-index: -1; user-select: none; }
.hero-hud { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.hero-hud .eyebrow { margin-bottom: 12px; }
.hud-id { color: var(--muted); font: 10px ui-monospace, monospace; letter-spacing: .12em; }
.eyebrow { margin: 0 0 22px; color: var(--muted); font: 700 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .13em; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 9px; background: var(--success); border-radius: 50%; box-shadow: 0 0 14px color-mix(in srgb, var(--success) 70%, transparent); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 30px; font-size: clamp(52px, 7vw, 90px); line-height: .98; letter-spacing: -.06em; font-weight: 850; }
h1 span { color: var(--accent); }
h1 .outline { color: transparent; -webkit-text-stroke: 1.5px var(--text); text-shadow: 0 0 35px color-mix(in srgb, var(--text) 8%, transparent); }
.hero-intro { max-width: 680px; color: var(--muted); font-size: 18px; }
.hero-intro strong { color: var(--text); font-weight: 650; }
.hero-actions { display: flex; gap: 12px; margin-top: 38px; }
.button { min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 24px; border: 1px solid var(--line); font-weight: 680; font-size: 14px; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: #071217; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: var(--accent); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 14%, transparent); }
.button.secondary { background: var(--surface); }
.terminal-card { border: 1px solid color-mix(in srgb, var(--accent-2) 28%, var(--line)); background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface-2) 92%, transparent)); box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.02) inset; transform: perspective(1000px) rotateY(-5deg) rotateX(2deg); backdrop-filter: blur(18px); position: relative; overflow: hidden; }
.terminal-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(255,255,255,.018) 4px); }
.radar { position: absolute; width: 190px; height: 190px; right: -62px; top: 58px; border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); border-radius: 50%; opacity: .42; }
.radar i { position: absolute; inset: 20%; border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 50%; }.radar i:nth-child(2){inset:40%}.radar i:nth-child(3){inset:0; border-style:dashed}.radar b { position:absolute; width:50%; height:1px; left:50%; top:50%; transform-origin:left; background:linear-gradient(90deg,var(--accent),transparent); animation:sweep 3s linear infinite; }
.terminal-top { height: 48px; display: flex; align-items: center; gap: 7px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.terminal-top > span { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .5; }
.terminal-top code { margin-left: auto; color: var(--muted); font-size: 11px; }
.terminal-card pre { margin: 0; padding: 30px 27px 20px; overflow: auto; font: 13px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.code-dim { color: var(--muted); }.code-accent { color: var(--accent-2); }.code-string { color: var(--accent); }.code-value { color: var(--text); }
.terminal-status { padding: 13px 27px; border-top: 1px solid var(--line); color: var(--muted); font: 11px ui-monospace, monospace; display:flex; gap:8px; align-items:center; }
.terminal-status span { color: var(--success); }
.terminal-status b { margin-left:auto; font-size:9px; color:var(--accent-2); }
.signal-marquee { overflow: hidden; border-block: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #071217; transform: rotate(-1deg) scale(1.02); }
.signal-marquee div { width: max-content; padding: 9px 0; font: 800 12px/1 ui-monospace, monospace; letter-spacing: .16em; animation: marquee 24s linear infinite; }
.proof-strip { border-block: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); }
.proof-strip div { padding: 28px 30px; text-align: center; border-right: 1px solid var(--line); }
.proof-strip div:last-child { border-right: 0; }
.proof-strip strong, .proof-strip span { display: block; }
.proof-strip strong { font-size: 21px; }.proof-strip span { color: var(--muted); font-size: 13px; margin-top: 4px; }
.section-block { padding: 130px 0; }
.section-heading { margin-bottom: 60px; }
.section-heading h2 { max-width: 790px; margin-bottom: 18px; font-size: clamp(38px, 5vw, 64px); line-height: 1.12; letter-spacing: -.045em; }
.section-heading > p:last-child { color: var(--muted); }
.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 260px 1fr; gap: 50px; padding: 46px 0 52px; border-bottom: 1px solid var(--line); }
.timeline-meta { display: flex; flex-direction: column; color: var(--muted); font: 12px/1.8 ui-monospace, monospace; }
.timeline-body h3 { margin-bottom: 5px; font-size: 26px; }.timeline-body .role { color: var(--accent); font-weight: 650; }
.timeline-body > p:not(.role), .timeline-body li { color: var(--muted); }
.timeline-body ul { padding-left: 20px; margin-bottom: 0; }
.timeline-body li + li { margin-top: 10px; }
.projects-section { padding: 130px 0; background: var(--surface); border-block: 1px solid var(--line); }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.project-card { position: relative; min-height: 340px; padding: 36px; background: linear-gradient(145deg, color-mix(in srgb, var(--bg) 94%, var(--surface)), color-mix(in srgb, var(--surface-2) 44%, var(--bg))); border: 1px solid var(--line); overflow: hidden; transform-style: preserve-3d; transition: border-color .3s ease, box-shadow .3s ease, transform .15s ease; }
.project-card:hover { border-color: color-mix(in srgb, var(--accent) 44%, var(--line)); box-shadow: 0 24px 64px rgba(0,0,0,.22), 0 0 34px color-mix(in srgb, var(--accent) 5%, transparent); }
.project-card::before { content:""; position:absolute; width:180px; height:180px; right:-90px; bottom:-90px; border:1px solid var(--line); transform:rotate(45deg); }
.project-card.featured { grid-column: 1 / -1; min-height: 430px; display: grid; grid-template-columns: 1fr 390px; gap: 60px; align-items: end; }
.project-index { position: absolute; top: 22px; right: 26px; color: var(--line); font: 800 70px/1 ui-monospace, monospace; }
.project-type { color: var(--accent); font: 700 11px/1.5 ui-monospace, monospace; letter-spacing: .1em; }
.project-card h3 { margin: 25px 0 16px; font-size: 28px; letter-spacing: -.025em; }
.project-card p:not(.project-type) { color: var(--muted); }
.project-details { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.project-details span { padding: 5px 9px; border: 1px solid var(--line); color: var(--muted); font: 11px ui-monospace, monospace; }
.system-map { position: relative; z-index: 1; }
.system-map div { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-bottom: 0; background: var(--surface); }
.system-map div:last-child { border-bottom: 1px solid var(--line); }
.system-map span { color: var(--accent-2); font: 11px ui-monospace, monospace; }.system-map b { font-size: 13px; font-weight: 600; }
.capability-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.capability { min-height: 220px; padding: 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.capability > span { color: var(--accent); font: 12px ui-monospace, monospace; }.capability h3 { margin: 40px 0 10px; font-size: 23px; }.capability p { color: var(--muted); }
.contact-section { padding: 130px 0; background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--surface) 88%, var(--bg))); border-top: 1px solid var(--line); }
.contact-inner { position: relative; overflow: hidden; padding: 72px; background: linear-gradient(135deg, color-mix(in srgb, var(--surface-2) 76%, var(--bg)), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); box-shadow: var(--shadow); }
.contact-inner::before { content: ""; position: absolute; width: 420px; height: 420px; right: -190px; top: -220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 68%); pointer-events: none; }
.contact-inner::after { content: ""; position: absolute; left: 0; top: 0; width: 190px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.contact-inner h2 { position: relative; max-width: 830px; margin-bottom: 30px; font-size: clamp(42px, 6vw, 76px); line-height: 1.06; letter-spacing: -.05em; }
.contact-inner .eyebrow, .contact-inner p { position: relative; color: var(--muted); }
.contact-links { margin: 34px 0 18px; display: flex; gap: 18px; align-items: center; font-weight: 750; font-size: 18px; }
.contact-links a, .masked-contact { color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--accent) 52%, var(--line)); transition: color .2s ease, border-color .2s ease; }
.contact-links a:hover { color: var(--accent); border-color: var(--accent); }
.contact-actions { margin-top: 26px; }
.contact-download { color: #071217; border-color: var(--accent); background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 12%, transparent); }
.privacy-note { font-size: 12px; }
footer { min-height: 84px; width: min(calc(100% - 48px), var(--max)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font: 11px ui-monospace, monospace; }
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { scale: 1.06; opacity: .7; } }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 740px) {
  .site-header nav { display: none; }
  .mobile-nav { display: flex; gap: 9px; overflow-x: auto; padding-top: 14px; scrollbar-width: none; }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav a { flex: 0 0 auto; padding: 7px 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
  .mobile-nav a:hover, .mobile-nav a:focus-visible { color: var(--text); border-color: var(--accent); }
  .hero { grid-template-columns: 1fr; gap: 55px; padding-top: 58px; }
  .noise { display: none; }
  .terminal-card { max-width: 610px; transform: none; backdrop-filter: none; }
  .hero::before, .radar b, .signal-marquee div { animation: none; }
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
  .proof-strip div:nth-child(2) { border-right: 0; }.proof-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .timeline-item { grid-template-columns: 1fr; gap: 18px; }
  .timeline-meta { flex-direction: row; gap: 14px; }
  .project-card.featured { grid-template-columns: 1fr; gap: 45px; }
}

@media (max-width: 620px) {
  .section-shell, .site-header, footer { width: min(calc(100% - 30px), var(--max)); }
  .site-header { height: 66px; }
  .hero { min-height: auto; padding: 66px 0 80px; }
  h1 { font-size: 50px; }
  .hero-intro { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .terminal-card pre { padding-inline: 18px; font-size: 11px; }
  .proof-strip div { padding: 21px 12px; }
  .section-block, .projects-section, .contact-section { padding: 90px 0; }
  .section-heading { margin-bottom: 42px; }
  .project-grid, .capability-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: auto; min-height: 0; }
  .project-card { min-height: 0; padding: 28px 24px; }
  .project-index { font-size: 52px; }
  .contact-inner { padding: 44px 24px; }
  .contact-inner h2 { font-size: 39px; }
  .contact-links { align-items: flex-start; flex-direction: column; gap: 8px; }
  .contact-links span { display: none; }
  footer { padding: 24px 0; align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .radar b, .hero::before, .signal-marquee div { animation: none; }
}

@media (hover: none), (pointer: coarse) {
  .cursor-glow { display: none; }
  .tilt-card { transform: none; }
}
