/* ── Jian Yan — Design System v2 ── */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600&family=Geist+Mono:wght@400;500&display=swap');

:root {
  --bg:        #0D1117;
  --surface:   #161B22;
  --border:    #21262D;
  --text:      #E6EDF3;
  --muted:     #8B949E;
  --blue:      #3B82F6;
  --green:     #3FB950;
  --orange:    #FF7B72;
  --yellow:    #F0B429;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'Geist', system-ui, sans-serif;
  --mono:  'Geist Mono', 'Fira Code', monospace;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 680px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-family: var(--mono); font-size: 14px; color: var(--muted); letter-spacing: 0.02em; }
.nav-brand span { color: var(--blue); }
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-size: 14px; color: var(--muted); transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 80px 0 64px; border-bottom: 1px solid var(--border); }
.hero-eyebrow { font-family: var(--mono); font-size: 12px; color: var(--green); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 20px; }
.hero h1 { font-family: var(--serif); font-size: clamp(2.4rem,5vw,3.2rem); font-weight: 400; line-height: 1.15; color: var(--text); margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--blue); }
.hero-tagline { font-size: 17px; color: var(--muted); line-height: 1.7; max-width: 560px; margin-bottom: 32px; }
.hero-tagline strong { color: var(--text); font-weight: 500; }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: #fff; padding: 10px 20px;
  border-radius: var(--radius-md); font-size: 14px; font-weight: 500; transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; text-decoration: none; }
.hero-links { display: flex; gap: 16px; }
.hero-links a { font-family: var(--mono); font-size: 13px; color: var(--muted); transition: color 0.15s; }
.hero-links a:hover { color: var(--text); text-decoration: none; }

/* Sections */
section { padding: 56px 0; border-bottom: 1px solid var(--border); }
section:last-child { border-bottom: none; }
.section-label { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 32px; }

/* Photos */
.photos-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.photo-item {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  aspect-ratio: 3/4; transition: border-color 0.15s, transform 0.15s;
}
.photo-item:hover { border-color: var(--blue); transform: scale(1.01); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.photo-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent,rgba(0,0,0,0.8));
  padding: 24px 12px 12px; font-family: var(--mono); font-size: 11px; color: #fff;
  opacity: 0; transition: opacity 0.2s;
}
.photo-item:hover .photo-caption { opacity: 1; }

/* Projects */
.projects-grid { display: flex; flex-direction: column; gap: 16px; }
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: border-color 0.15s, transform 0.15s;
}
.project-card:hover { border-color: var(--blue); transform: translateY(-1px); }
.project-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.project-name { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; color: var(--text); }
.project-status { font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 9999px; white-space: nowrap; flex-shrink: 0; }
.status-live     { background: rgba(63,185,80,0.12);  color: var(--green);  border: 1px solid rgba(63,185,80,0.25); }
.status-deployed { background: rgba(59,130,246,0.12); color: var(--blue);   border: 1px solid rgba(59,130,246,0.25); }
.status-review   { background: rgba(240,180,41,0.12); color: var(--yellow); border: 1px solid rgba(240,180,41,0.25); }
.project-desc { font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 14px; }
.project-desc strong { color: var(--text); font-weight: 500; }
.project-footer { display: flex; align-items: center; justify-content: space-between; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-family: var(--mono); font-size: 11px; color: var(--orange); background: rgba(255,123,114,0.1); padding: 2px 8px; border-radius: var(--radius-sm); }
.project-link { font-family: var(--mono); font-size: 12px; color: var(--blue); }

/* About */
.bio-text { font-size: 16px; color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
.bio-text strong { color: var(--text); font-weight: 500; }
.stats-row { display: flex; gap: 32px; margin-top: 32px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-family: var(--mono); font-size: 1.6rem; font-weight: 500; color: var(--text); }
.stat-label { font-size: 12px; color: var(--muted); }

/* Education */
.edu-list { display: flex; flex-direction: column; }
.edu-item { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.edu-item:last-child { border-bottom: none; }
.edu-year { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 60px; flex-shrink: 0; }
.edu-info { flex: 1; }
.edu-school { font-size: 15px; color: var(--text); font-weight: 500; margin-bottom: 2px; }
.edu-degree { font-size: 13px; color: var(--muted); }

/* Awards */
.awards-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.awards-list li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.awards-list li::before { content: '▸'; color: var(--blue); font-family: var(--mono); font-size: 11px; flex-shrink: 0; }
.awards-list li strong { color: var(--text); }

/* Deepdive */
.deepdive-list { display: flex; flex-direction: column; gap: 12px; }
.deepdive-item {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); transition: border-color 0.15s; text-decoration: none;
}
.deepdive-item:hover { border-color: var(--blue); }
.deepdive-icon { font-size: 18px; width: 36px; text-align: center; flex-shrink: 0; }
.deepdive-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.deepdive-desc { font-size: 12px; color: var(--muted); }
.deepdive-arrow { margin-left: auto; color: var(--muted); font-size: 16px; }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease forwards; }
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }

/* Footer */
footer { padding: 40px 0; text-align: center; }
.footer-text { font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 2; }

/* Responsive */
@media (max-width: 600px) {
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 2rem; }
  .stats-row { gap: 20px; }
  .nav-links { gap: 16px; }
  .photos-grid { grid-template-columns: 1fr; }
  .photo-item { aspect-ratio: 4/3; }
}
