:root {
  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #9ca3af;
  --line: #e5e7eb;
  --accent: #1a2e4a;
  --gold: #b8894b;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --max: 760px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Inter", -apple-system,
               BlinkMacSystemFont, "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
a:hover { border-bottom-color: var(--accent); }

strong { color: var(--ink); font-weight: 600; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.nav-name {
  font-weight: 600;
  color: var(--ink);
  border: none;
  letter-spacing: 0.5px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--ink-2); border: none; }
.nav-links a:hover { color: var(--ink); }

/* Main container */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 24px 96px;
}

/* Hero */
.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 72px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}
.hero-text { flex: 1; }
h1 {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 1.2;
}
h1 .en {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 8px;
}
.hero-role {
  font-size: 18px;
  color: var(--accent);
  margin-top: 18px;
  margin-bottom: 14px;
  font-weight: 500;
}
.hero-tagline {
  color: var(--ink-2);
  font-size: 15px;
  max-width: 440px;
  line-height: 1.7;
}
.hero-photo {
  width: 112px;
  height: 140px;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
  flex: 0 0 auto;
}

/* Section */
.section { margin-bottom: 64px; }
.section h2 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 1px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.section h2 .en {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 400;
}
.section-lead {
  color: var(--ink-2);
  margin-bottom: 28px;
  font-size: 15px;
}

#about p { color: var(--ink-2); margin-bottom: 14px; }
#about p:last-child { margin-bottom: 0; }

/* Experience */
.job { margin-bottom: 32px; }
.job:last-child { margin-bottom: 0; }
.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}
.job-company { font-size: 16px; font-weight: 600; color: var(--ink); }
.job-role { color: var(--ink-2); font-size: 14px; }
.job-date {
  color: var(--ink-3);
  font-size: 13px;
  font-family: "SF Mono", "Menlo", monospace;
  white-space: nowrap;
}
.job ul { list-style: none; padding: 0; }
.job li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 14.5px;
}
.job li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-3);
}

/* Projects */
.project-list { display: grid; gap: 28px; }
.project {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.project:first-child { border-top: none; padding-top: 0; }
.project h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.project-meta {
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.project p {
  color: var(--ink-2);
  font-size: 14.5px;
  margin-bottom: 6px;
}
.project p:last-child { margin-bottom: 0; }
.project .tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project .tags span {
  font-size: 12px;
  color: var(--ink-2);
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* Contact */
.contact-list { list-style: none; padding: 0; }
.contact-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  gap: 16px;
}
.contact-list li:last-child { border-bottom: none; }
.contact-list .label { color: var(--ink-3); flex: 0 0 auto; font-size: 13px; letter-spacing: 1px; }
.contact-list .val {
  color: var(--ink);
  font-family: "SF Mono", "Menlo", "PingFang SC", sans-serif;
  text-align: right;
}
.contact-list a { border-bottom: none; }

/* Footer */
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  border-top: 1px solid var(--line);
  letter-spacing: 1px;
}

/* Metrics strip (typographic, no boxes) */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 32px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}
.metric { text-align: left; padding-right: 12px; }
.metric:not(:last-child) { border-right: 1px solid var(--line); }
.metric-value {
  font-family: "Helvetica Neue", "Inter", sans-serif;
  font-size: 34px;
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 8px;
}
.metric-value .accent { color: var(--gold); font-weight: 500; }
.metric-label {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Pull quote (between hero and about) */
.pullquote {
  padding: 40px 0 64px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.pullquote blockquote {
  font-size: 22px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: 0.3px;
  font-style: italic;
  position: relative;
  padding-left: 20px;
  border-left: 3px solid var(--gold);
}
.pullquote cite {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-style: normal;
}

/* Section num decoration */
.section h2 { position: relative; }
.section h2::before {
  content: attr(data-num);
  position: absolute;
  left: -52px;
  top: -6px;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 2px;
  font-weight: 500;
}

/* Experience timeline dots */
.job { position: relative; padding-left: 20px; }
.job::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.job:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 3.5px; top: 20px;
  width: 1px;
  height: calc(100% - 4px);
  background: var(--line);
}

/* Education (reuses job markup) */
.edu-list { display: grid; gap: 20px; }
.edu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-left: 20px;
  position: relative;
  flex-wrap: wrap;
}
.edu-item::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: transparent;
}
.edu-school { font-size: 15px; color: var(--ink); }
.edu-school b { font-weight: 600; }
.edu-degree { color: var(--ink-2); margin-left: 6px; font-size: 14px; }
.edu-date {
  color: var(--ink-3);
  font-size: 13px;
  font-family: "SF Mono", "Menlo", monospace;
  white-space: nowrap;
}

/* Project subsection header */
.project-subheader {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.project-subheader.second { margin-top: 40px; }

/* Featured project (first one) — slightly different */
.project.featured {
  background: var(--bg-soft);
  padding: 24px;
  border-radius: 6px;
  border-top: none;
}

/* Mobile */
@media (max-width: 640px) {
  .hero {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 20px;
  }
  .hero-photo { width: 88px; height: 110px; }
  h1 { font-size: 28px; }
  .nav-links { gap: 18px; font-size: 13px; }
  main { padding: 48px 20px 72px; }
  .contact-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
  .contact-list .val { text-align: left; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 20px 8px; }
  .metric-value { font-size: 26px; }
  .pullquote blockquote { font-size: 18px; }
  .section h2::before { display: none; }
  .edu-item { flex-direction: column; align-items: flex-start; gap: 4px; }
}
