:root {
  --bg: #0a0f14;
  --surface: #111820;
  --surface-2: #151f29;
  --text: #f2f7f5;
  --muted: #9baaa5;
  --line: #26343c;
  --accent: #6ee7b7;
  --accent-strong: #34d399;
  --accent-ink: #06291d;
  --shell: 1180px;
  --header-height: 76px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 4%, rgba(52, 211, 153, 0.11), transparent 26rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }

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

.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 8px;
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

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

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: rgba(10, 15, 20, 0.78);
  backdrop-filter: blur(16px);
  transition: border-color 200ms ease, background 200ms ease;
}

.site-header.is-scrolled { border-color: var(--line); background: rgba(10, 15, 20, 0.94); }

.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; }

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 11px;
  font-weight: 850;
  letter-spacing: -0.06em;
}

.brand-copy { display: grid; line-height: 1.18; }
.brand-copy strong { font-size: 15px; letter-spacing: 0.03em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: 0.16em; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { position: relative; color: #c7d0cd; font-size: 14px; transition: color 180ms ease; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.nav-links .nav-cta { padding: 10px 17px; color: var(--accent); border: 1px solid #356954; border-radius: 999px; }
.nav-links .nav-cta:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.nav-toggle { display: none; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: clamp(50px, 8vw, 110px);
  min-height: calc(100dvh - var(--header-height));
  padding-block: clamp(72px, 10vw, 132px) 88px;
  align-items: center;
}

.eyebrow, .section-index, .project-kicker {
  margin: 0;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 5px rgba(110, 231, 183, 0.1); }

.hero h1 {
  max-width: 780px;
  margin: 24px 0 26px;
  font-size: clamp(42px, 6.6vw, 84px);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.065em;
}
.hero h1 span { color: var(--accent); }

.hero-intro { max-width: 680px; margin: 0; color: #bcc8c4; font-size: clamp(17px, 1.65vw, 20px); line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 22px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.button:active { transform: scale(0.98); }
.button svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.button-primary { color: var(--accent-ink); background: var(--accent); }
.button-primary:hover { background: #98f0cf; }
.button-secondary { color: var(--text); background: transparent; border-color: var(--line); }
.button-secondary:hover { background: var(--surface); border-color: #48605a; }

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 0; padding: 0; list-style: none; }
.hero-tags li, .tech-list li {
  padding: 7px 11px;
  color: var(--muted);
  background: rgba(17, 24, 32, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.profile-card { position: relative; padding: 12px; overflow: hidden; background: linear-gradient(145deg, #18232d, #0d141b); border: 1px solid #2a3a43; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.profile-card::before { position: absolute; width: 180px; height: 180px; top: -70px; right: -60px; background: rgba(110, 231, 183, 0.18); border-radius: 50%; filter: blur(50px); content: ""; }
.portrait-wrap { position: relative; overflow: hidden; aspect-ratio: 4 / 4.15; background: #e8edeb; border-radius: 21px; }
.portrait-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; filter: saturate(0.76) contrast(1.04); }
.portrait-label { position: absolute; right: 14px; bottom: 14px; padding: 7px 10px; color: var(--accent-ink); background: var(--accent); border-radius: 999px; font-family: Consolas, monospace; font-size: 9px; font-weight: 800; letter-spacing: 0.1em; }
.profile-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 12px; overflow: hidden; background: var(--line); border-radius: 14px; }
.profile-meta div { display: grid; padding: 13px 10px; background: #101820; }
.profile-meta span { color: var(--muted); font-size: 10px; }
.profile-meta strong { margin-top: 3px; font-size: 11px; font-weight: 650; }
.profile-code { display: grid; gap: 5px; margin: 12px 4px 2px; padding: 15px; background: #070c10; border: 1px solid #1c282e; border-radius: 14px; }
.profile-code > span { margin-bottom: 6px; color: #71817b; font-family: Consolas, monospace; font-size: 10px; }
.profile-code code { color: #c5d0cc; font-size: 11px; }
.profile-code i { margin-right: 11px; color: #50615a; font-style: normal; }

.proof-strip { border-block: 1px solid var(--line); background: rgba(17, 24, 32, 0.65); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats div { display: grid; gap: 3px; padding: 30px 28px; border-left: 1px solid var(--line); }
.stats div:last-child { border-right: 1px solid var(--line); }
.stats strong { color: var(--accent); font-size: 28px; letter-spacing: -0.04em; }
.stats span { color: var(--muted); font-size: 12px; }

.section { padding-block: clamp(88px, 11vw, 150px); }
.section-panel { background: #0d141a; border-block: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 180px minmax(0, 760px); gap: 42px; margin-bottom: clamp(48px, 7vw, 80px); align-items: start; }
.section-heading h2 { margin: -8px 0 0; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.17; letter-spacing: -0.045em; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(50px, 9vw, 130px); }
.about-lead { margin: 0; font-size: clamp(26px, 3.2vw, 40px); font-weight: 650; line-height: 1.42; letter-spacing: -0.035em; }
.about-detail { color: #aebbb6; }
.about-detail p { margin: 0 0 20px; }

.experience-card { display: grid; grid-template-columns: 230px 1fr; gap: 40px; padding-top: 36px; border-top: 1px solid #405159; }
.experience-time { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; color: var(--muted); font-family: Consolas, monospace; font-size: 12px; }
.pill { display: inline-flex; padding: 6px 10px; color: #b7c5c0; background: #18232b; border: 1px solid #314149; border-radius: 999px; font-family: Consolas, monospace; font-size: 10px; font-weight: 700; }
.pill-green { color: var(--accent); background: rgba(110, 231, 183, 0.08); border-color: #356954; }
.company { margin: 0 0 8px; color: var(--accent); font-size: 14px; font-weight: 700; }
.experience-body h3 { margin: 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.03em; }
.experience-body > p:not(.company) { max-width: 780px; color: var(--muted); }
.outcome-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 34px; }
.outcome-grid div { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 20px; background: #111a21; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.outcome-grid span { color: var(--accent); font-family: Consolas, monospace; font-size: 11px; }
.outcome-grid p { margin: 0; color: #c0cbc7; font-size: 14px; }

.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.project-card { display: flex; min-height: 620px; padding: clamp(24px, 4vw, 38px); flex-direction: column; justify-content: space-between; gap: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.project-featured { background: linear-gradient(150deg, #15251f, #0f181b 58%); border-color: #355c4d; }
.project-topline { display: flex; align-items: center; justify-content: space-between; }
.project-number { color: #53645e; font-family: Consolas, monospace; font-size: 12px; }
.project-card h3, .case-study h3, .skill-card h3, .education-card h3 { margin: 10px 0 16px; font-size: clamp(26px, 3vw, 38px); line-height: 1.23; letter-spacing: -0.035em; }
.project-card > div > p:last-child { color: var(--muted); }
.pipeline { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto; align-items: center; gap: 9px; }
.pipeline span { padding: 9px 10px; text-align: center; background: #0b1213; border: 1px solid #2f4e43; border-radius: 8px; color: #c7d7d1; font-size: 10px; white-space: nowrap; }
.pipeline i { height: 1px; background: #396352; }
.project-metrics { display: grid; grid-template-columns: 1fr; gap: 1px; margin: 0; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 12px; }
.project-metrics div { display: flex; padding: 13px 15px; justify-content: space-between; gap: 20px; background: #0d1718; }
.project-metrics dt { color: var(--muted); font-size: 11px; }
.project-metrics dd { margin: 0; text-align: right; font-size: 12px; font-weight: 700; }
.tech-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.architecture { display: grid; grid-template-columns: 1fr 36px 1.25fr 36px 1fr; gap: 8px; align-items: center; }
.architecture > div { display: grid; min-height: 78px; padding: 12px; place-content: center; text-align: center; background: #0b1217; border: 1px solid #2a3b43; border-radius: 10px; }
.architecture span { color: var(--accent); font-family: Consolas, monospace; font-size: 9px; letter-spacing: 0.12em; }
.architecture strong { margin-top: 4px; font-size: 10px; }
.architecture svg { fill: none; stroke: #5a6c67; stroke-width: 1.5; }
.project-points { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.project-points li { position: relative; padding-left: 20px; color: #afbbb7; font-size: 13px; }
.project-points li::before { position: absolute; top: 0.7em; left: 0; width: 7px; height: 1px; background: var(--accent); content: ""; }

.case-study { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(40px, 8vw, 100px); margin-top: 18px; padding: clamp(28px, 5vw, 52px); background: #0c1318; border: 1px solid var(--line); border-radius: var(--radius-md); }
.case-intro > p:last-child { color: var(--muted); }
.case-steps { margin: 0; padding: 0; list-style: none; counter-reset: case; }
.case-steps li { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.case-steps li:last-child { border-bottom: 0; }
.case-steps span { color: var(--accent); font-weight: 750; }
.case-steps p { margin: 0; color: #bac6c1; }

.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.skill-card { padding: 28px; background: #111a21; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.skill-card > span { color: #53645e; font-family: Consolas, monospace; font-size: 11px; }
.skill-card h3 { font-size: 25px; }
.skill-card p { min-height: 52px; color: #b4c0bc; }
.skill-card small { color: var(--accent); font-family: Consolas, monospace; font-size: 10px; line-height: 1.8; }

.education-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 16px; }
.education-card { padding: 32px; background: linear-gradient(150deg, #14251f, #0f181a); border: 1px solid #355c4d; border-radius: var(--radius-md); }
.education-card > p:not(.project-kicker) { color: var(--muted); }
.education-card dl { margin: 34px 0 0; }
.education-card dl div { display: flex; padding: 12px 0; justify-content: space-between; border-bottom: 1px solid #2c4038; }
.education-card dt { color: var(--muted); font-size: 12px; }
.education-card dd { margin: 0; font-weight: 700; }
.awards-list { padding: 10px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.awards-list div { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.awards-list div:last-child { border-bottom: 0; }
.awards-list span { color: var(--accent); font-size: 12px; font-weight: 700; }
.awards-list p { margin: 0; color: #c4cecb; font-size: 14px; }

.contact-section { padding-block: clamp(90px, 12vw, 160px); background: var(--accent); color: var(--accent-ink); }
.contact-inner { max-width: 950px; text-align: center; }
.contact-section .section-index { color: #176247; }
.contact-section h2 { margin: 20px auto; font-size: clamp(36px, 5.6vw, 68px); line-height: 1.16; letter-spacing: -0.055em; }
.contact-section p { font-weight: 600; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; justify-content: center; }
.contact-section .button-primary { color: var(--text); background: var(--bg); }
.contact-section .button-primary:hover { background: #19252c; }
.contact-section .button-secondary { color: var(--accent-ink); border-color: rgba(6, 41, 29, 0.45); }
.contact-section .button-secondary:hover { background: rgba(255, 255, 255, 0.23); border-color: var(--accent-ink); }
.copy-status { min-height: 26px; margin: 13px 0 0; font-size: 13px; }

.footer { padding-block: 28px; color: #81908b; background: #070b0f; border-top: 1px solid #172126; font-size: 11px; }
.footer .shell { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer p { margin: 0; }
.footer a { min-height: 44px; display: inline-flex; align-items: center; color: #b7c4bf; }

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 560ms cubic-bezier(0.16, 1, 0.3, 1), transform 560ms cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 760px; }
  .profile-card { display: grid; grid-template-columns: 0.86fr 1.14fr; gap: 12px; }
  .portrait-wrap { grid-row: span 2; }
  .profile-meta { grid-template-columns: 1fr; margin-top: 0; }
  .profile-code { margin: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-top: 1px solid var(--line); }
  .stats div:nth-child(4) { border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
  .section-heading { grid-template-columns: 1fr; gap: 22px; }
  .about-grid, .project-grid, .case-study, .education-grid { grid-template-columns: 1fr; }
  .experience-card { grid-template-columns: 1fr; }
  .experience-time { flex-direction: row; align-items: center; }
}

@media (max-width: 700px) {
  :root { --header-height: 68px; }
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .brand-copy { display: none; }
  .nav-toggle { display: grid; width: 48px; height: 48px; padding: 0; place-content: center; gap: 6px; color: var(--text); background: transparent; border: 0; border-radius: 10px; cursor: pointer; }
  .nav-toggle span { display: block; width: 22px; height: 1.5px; background: currentColor; transition: transform 180ms ease; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav-links { position: absolute; top: calc(100% + 1px); right: 0; left: 0; display: none; padding: 14px 16px 22px; align-items: stretch; flex-direction: column; gap: 2px; background: rgba(10, 15, 20, 0.98); border-bottom: 1px solid var(--line); }
  .nav-links.is-open { display: flex; }
  .nav-links a { display: flex; min-height: 48px; padding: 10px 12px; align-items: center; }
  .nav-links a::after { display: none; }
  .nav-links .nav-cta { margin-top: 8px; justify-content: center; }
  .hero { padding-block: 66px 72px; }
  .hero h1 { font-size: clamp(40px, 12.5vw, 61px); }
  .profile-card { display: block; }
  .portrait-wrap { aspect-ratio: 1 / 1.04; }
  .profile-meta { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
  .profile-code { margin: 12px 4px 2px; }
  .stats div { padding: 24px 18px; }
  .stats strong { font-size: 24px; }
  .section { padding-block: 84px; }
  .about-lead { font-size: 28px; }
  .outcome-grid, .skill-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 0; }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline i { width: 1px; height: 10px; margin: -2px auto; }
  .architecture { grid-template-columns: 1fr; }
  .architecture svg { width: 32px; margin: -6px auto; transform: rotate(90deg); }
  .project-metrics div { display: grid; gap: 2px; }
  .project-metrics dd { text-align: left; }
  .case-steps li { grid-template-columns: 58px 1fr; gap: 12px; }
  .awards-list { padding: 8px 20px; }
  .awards-list div { grid-template-columns: 1fr; gap: 4px; }
  .footer .shell { align-items: flex-start; flex-direction: column; }
  .footer p:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
