/* MurphyYi — personal command center
   midnight #0d1117 · surface #161b22 · ink #e6edf3 · muted #8b949e · accent #41B883 */

:root {
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --bg-soft: #1c2128;
  --ink: #e6edf3;
  --muted: #8b949e;
  --faint: #6e7681;
  --accent: #41b883;
  --accent-dim: #2f9e6f;
  --accent-soft: rgba(65, 184, 131, 0.12);
  --accent-glow: rgba(65, 184, 131, 0.22);
  --border: rgba(240, 246, 252, 0.08);
  --border-strong: rgba(240, 246, 252, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;
  --font-display: "Outfit", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Outfit", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.28);
  --shadow-hover: 0 18px 50px rgba(0, 0, 0, 0.38);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
strong { color: var(--ink); font-weight: 600; }

/* ── Backgrounds ───────────────────────────────────── */

.bg-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(65, 184, 131, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 184, 131, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 72%);
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
}

.bg-glow-a {
  top: -120px;
  left: 50%;
  width: 640px;
  height: 380px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(65, 184, 131, 0.2), transparent 70%);
}

.bg-glow-b {
  top: 40%;
  right: -180px;
  width: 420px;
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(44, 62, 80, 0.35), transparent 70%);
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Header ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: calc(var(--max) + 80px);
  margin: 0 auto;
  padding: 16px 28px;
  background: rgba(13, 17, 23, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-mark svg { border-radius: 8px; }
.brand-name { font-size: 17px; }

.nav {
  display: flex;
  gap: 22px;
  margin-left: 8px;
  font-size: 14px;
  color: var(--muted);
}

.nav a { transition: color 0.18s ease; }
.nav a:hover { color: var(--ink); }

.header-cta {
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.header-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ── Hero ───────────────────────────────────────────── */

.hero {
  position: relative;
  z-index: 1;
  padding: 76px 28px 36px;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto 48px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(22, 27, 34, 0.7);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 20px;
  margin: 0 0 14px;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.hero-name {
  font-size: clamp(52px, 9vw, 88px);
  font-weight: 800;
  background: linear-gradient(120deg, #e6edf3 8%, var(--accent) 52%, #7dd3b0 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-zh {
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 500;
  color: var(--muted);
}

.hero-tagline {
  margin: 0 0 20px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 500;
}

.typed-line {
  position: relative;
  padding-right: 12px;
}

.typed-line::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0.15em;
  width: 2px;
  height: 1.05em;
  background: var(--accent);
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 17.5px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary {
  background: linear-gradient(180deg, #4bc993 0%, var(--accent-dim) 100%);
  color: #06281b;
  box-shadow: 0 8px 24px rgba(65, 184, 131, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(65, 184, 131, 0.36);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  background: rgba(22, 27, 34, 0.65);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ── Stat strip ─────────────────────────────────────── */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(65, 184, 131, 0.07), transparent 55%),
    rgba(22, 27, 34, 0.75);
  box-shadow: var(--shadow-card);
}

.stat {
  padding: 10px 8px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat:last-child { border-right: none; }

.stat-num {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(120deg, var(--ink), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-plus {
  font-size: 0.55em;
  font-weight: 700;
}

.stat-label {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Sections ───────────────────────────────────────── */

.section {
  position: relative;
  z-index: 1;
  max-width: calc(var(--max) + 80px);
  margin: 0 auto;
  padding: 72px 28px;
}

.section-head { margin-bottom: 30px; }

.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

/* ── Universe (org cards) ───────────────────────────── */

.universe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.org-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.org-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.org-card:hover {
  transform: translateY(-5px);
  border-color: rgba(65, 184, 131, 0.38);
  box-shadow: var(--shadow-hover);
}

.org-card:hover::before { opacity: 1; }

.org-oekit { background: linear-gradient(150deg, rgba(65, 184, 131, 0.1), transparent 42%), var(--bg-elevated); }
.org-oagent { background: linear-gradient(150deg, rgba(96, 165, 250, 0.1), transparent 42%), var(--bg-elevated); }
.org-yinology { background: linear-gradient(150deg, rgba(245, 158, 11, 0.1), transparent 42%), var(--bg-elevated); }
.org-personal { background: linear-gradient(150deg, rgba(167, 139, 250, 0.1), transparent 42%), var(--bg-elevated); }

.org-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.org-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: rgba(13, 17, 23, 0.55);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.org-oagent .org-icon { color: #60a5fa; }
.org-yinology .org-icon { color: #f59e0b; }
.org-personal .org-icon { color: #a78bfa; }

.org-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -0.01em;
}

.org-head h3 a {
  background: linear-gradient(120deg, var(--ink), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.org-oagent .org-head h3 a {
  background: linear-gradient(120deg, var(--ink), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
}

.org-yinology .org-head h3 a {
  background: linear-gradient(120deg, var(--ink), #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
}

.org-personal .org-head h3 a {
  background: linear-gradient(120deg, var(--ink), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
}

.org-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.org-badge {
  margin-left: auto;
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.org-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.org-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.org-metrics div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 88px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.4);
}

.org-metrics b {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.org-metrics span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.org-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.org-links a {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12.5px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.org-links a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ── Spotlight ──────────────────────────────────────── */

.spotlight-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
  margin-bottom: 18px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(65, 184, 131, 0.09), transparent 42%),
    var(--bg-elevated);
  box-shadow: var(--shadow-card);
}

.spotlight-alt {
  background:
    linear-gradient(145deg, rgba(125, 211, 176, 0.08), transparent 42%),
    var(--bg-elevated);
}

.spotlight-badge {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 5px 10px;
  border: 1px solid rgba(65, 184, 131, 0.28);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.spotlight-main h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: -0.02em;
}

.spotlight-main h3 a {
  background: linear-gradient(120deg, var(--ink), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.spotlight-lead {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 600;
}

.spotlight-body {
  margin: 0 0 22px;
  color: var(--muted);
}

.spotlight-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spotlight-links a {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.spotlight-links a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.spotlight-features {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spotlight-features li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.45);
}

.feat-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 16px;
}

.spotlight-features strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.spotlight-features span:last-child {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ── Work grid ──────────────────────────────────────── */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(65, 184, 131, 0.4);
  background: var(--bg-soft);
  box-shadow: var(--shadow-hover);
}

.work-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.work-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.lang {
  flex-shrink: 0;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.work-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.work-tags span {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
}

.more-line {
  margin: 18px 0 0;
  color: var(--faint);
  font-size: 13.5px;
  line-height: 1.9;
}

.more-line a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.more-line a:hover {
  color: var(--accent);
  border-bottom-color: rgba(65, 184, 131, 0.4);
}

/* ── Data cards ─────────────────────────────────────── */

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.data-card {
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.data-card:hover {
  transform: translateY(-3px);
  border-color: rgba(65, 184, 131, 0.32);
  box-shadow: var(--shadow-card);
}

.data-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.snake-wrap {
  margin: 22px 0 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.snake-wrap img {
  width: 100%;
  height: auto;
}

/* ── Stack ──────────────────────────────────────────── */

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

.stack-list li {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.stack-list li:hover {
  border-color: rgba(65, 184, 131, 0.45);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── Contact ────────────────────────────────────────── */

.contact-lead {
  margin: -8px 0 24px;
  color: var(--muted);
  font-size: 16px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(65, 184, 131, 0.4);
  background: var(--bg-soft);
}

.contact-label {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-value {
  font-size: 16px;
  font-weight: 500;
}

/* ── Footer ─────────────────────────────────────────── */

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  border-top: 1px solid var(--border);
  background: #0a0e13;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  max-width: calc(var(--max) + 80px);
  margin: 0 auto;
  padding: 26px 28px;
  color: var(--faint);
  font-size: 13px;
}

.footer-note {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 900px) {
  .site-header {
    gap: 16px;
    padding: 14px 18px;
  }

  .nav { display: none; }

  .hero { padding: 48px 18px 28px; }
  .section { padding: 56px 18px; }

  .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 14px 8px;
  }

  .stat:nth-last-child(-n + 1) { border-bottom: none; }

  .universe-grid,
  .spotlight-card,
  .work-grid,
  .data-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    padding: 22px 18px;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse-dot,
  .typed-line::after { animation: none; }
  .work-card,
  .btn,
  .contact-card,
  .stack-list li,
  .org-card,
  .data-card {
    transition: none;
  }
}
