/* ═══════════════════════════════════════════
   Chaomei Yan — Personal Site
   Light, minimal, systems-engineer aesthetic
   ═══════════════════════════════════════════ */

:root {
    --bg:          #fafafa;
    --bg-elevated: #ffffff;
    --bg-hover:    #f3f4f6;
    --text:        #111111;
    --text-dim:    #555555;
    --text-muted:  #999999;
    --accent:      #2563eb;
    --accent-dim:  #3b82f6;
    --border:      #e5e7eb;
    --border-hover:#d1d5db;
    --mono:        'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    --sans:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--accent-dim);
    color: #fff;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover { color: #1d4ed8; }

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

/* ── Nav ──────────────────────────────── */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

nav .logo {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.3px;
}

nav .nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

nav .nav-links a {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 400;
    transition: color 0.15s;
}

nav .nav-links a:hover { color: var(--text); }

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

.hero {
    padding: 140px 0 80px;
    border-bottom: 1px solid var(--border);
}

.hero-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-hover);
    margin-bottom: 24px;
}

.hero-tagline {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero h1 .dim { color: var(--text-dim); }

.hero-desc {
    font-size: 16px;
    color: var(--text-dim);
    line-height: 1.8;
    max-width: 560px;
    margin-bottom: 32px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s;
    font-family: var(--sans);
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
    border: 1px solid var(--text);
}

.btn-primary:hover {
    background: #222;
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border-hover);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* ── Section ──────────────────────────── */

section {
    padding: 72px 0;
    border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

.section-label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 40px;
}

/* ── Focus Areas ──────────────────────── */

.focus-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.focus-item {
    background: var(--bg);
    padding: 24px;
    transition: background 0.15s;
}

.focus-item:hover { background: var(--bg-elevated); }

.focus-item h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.focus-item p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Projects ─────────────────────────── */

.project-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.project-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    background: var(--bg);
    padding: 24px;
    transition: background 0.15s;
}

.project-item:hover { background: var(--bg-elevated); }

.project-info { flex: 1; }

.project-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.project-name a {
    color: var(--text);
    transition: color 0.15s;
}

.project-name a:hover { color: var(--accent); }

.project-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

.project-tag {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    padding: 4px 10px;
    border: 1px solid var(--border-hover);
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── OSS Contributions ────────────────── */

.oss-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.oss-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-dim);
    transition: all 0.15s;
}

.oss-chip:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.oss-chip .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-dim);
}

/* ── Philosophy ────────────────────────── */

.philosophy-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.philosophy-item h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.philosophy-item p {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.8;
}

/* ── Writing ──────────────────────────── */

.writing-placeholder {
    padding: 40px;
    border: 1px dashed var(--border-hover);
    border-radius: 8px;
    text-align: center;
}

.writing-placeholder p {
    font-size: 14px;
    color: var(--text-muted);
}

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

footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.15s;
}

.footer-links a:hover { color: var(--text); }

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

@media (max-width: 640px) {
    .hero { padding: 100px 0 60px; }
    .hero h1 { font-size: 30px; }
    .hero-desc { font-size: 15px; }
    .focus-grid { grid-template-columns: 1fr; }
    .project-item { flex-direction: column; gap: 8px; }
    .project-tag { align-self: flex-start; }
    footer .container { flex-direction: column; gap: 16px; text-align: center; }
    nav .nav-links { gap: 16px; }
    nav .nav-links a { font-size: 12px; }
}
