@import './global.css';

:root {
  --bg: #f8f7f2;
  --bg-soft: #e8edf0;
  --surface: #fff;
  --border: rgba(34,45,52,0.13);
  --text: #202325;
  --muted: #626c72;
  --accent: #25635a;
  --accent-2: #3157a3;
  --accent-soft: rgba(37,99,90,0.1);
  --serif: 'Playfair Display', 'Noto Sans TC', serif;
  --sans: 'Inter', 'Noto Sans TC', sans-serif;
  --max-w: 880px;
  --gap: 1.5rem;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

.wrap { width: min(var(--max-w), calc(100% - 2rem)); margin: 0 auto; }

/* ── NAV ── */
.nav { padding: 1.5rem 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.nav-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.nav-links { display: flex; gap: 1.25rem; }
.nav-links a { color: var(--muted); font-size: 0.85rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }

/* ── HERO ── */
.hero { padding: 4rem 0 3rem; }
.hero-role { font-size: 0.85rem; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; margin-bottom: 1rem; }
.hero h1 { font-family: var(--serif); font-size: 3.5rem; font-weight: 700; letter-spacing: 0; line-height: 1.1; max-width: 16ch; }
.hero-sub { color: var(--muted); font-size: 1.05rem; max-width: 50ch; margin-top: 1rem; line-height: 1.7; }
.hero-portrait { display: inline-grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0.9rem; align-items: center; margin-top: 1.5rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,0.7); }
.hero-portrait img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; filter: grayscale(12%) contrast(1.04); }
.hero-portrait span { color: var(--accent-2); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── SECTION ── */
.section { padding: 3rem 0; border-top: 1px solid var(--border); }
.section-label { font-size: 0.72rem; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; margin-bottom: 1.5rem; }
.section h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; margin-bottom: 1rem; }
.section p { color: var(--muted); max-width: 60ch; line-height: 1.75; }
.section p + p { margin-top: 0.75rem; }

/* ── STATS ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--gap); }
.stat { text-align: center; padding: 1.5rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.stat-value { font-family: var(--serif); font-size: 2rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── SKILLS ── */
.skills-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag { padding: 0.35rem 0.75rem; background: var(--accent-soft); border-radius: 8px; font-size: 0.82rem; color: var(--accent); font-weight: 600; }

/* ── PROJECTS ── */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.project { padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; transition: box-shadow 0.3s; display: flex; flex-direction: column; }
.project:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.06); }
.project-stack { font-size: 0.72rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.project h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.project p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; flex: 1; }

/* ── CONTRIBUTIONS ── */
.contribs { display: grid; gap: 0.65rem; }
.contrib { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1.15rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 0.88rem; transition: box-shadow 0.3s; }
.contrib:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.05); }
.contrib-type { font-size: 0.7rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: var(--accent-soft); padding: 0.15rem 0.45rem; border-radius: 4px; }
.contrib-repo { color: var(--muted); font-size: 0.8rem; }

/* ── ROLES ── */
.roles { display: grid; gap: 1.25rem; }
.role { padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.role h3 { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; margin-bottom: 0.35rem; }
.role p { font-size: 0.88rem; color: var(--muted); }
.role-evidence { font-size: 0.75rem; color: var(--accent); font-weight: 600; margin-top: 0.35rem; }

/* ── RAMP ── */
.ramp { display: grid; gap: 1.25rem; }
.ramp-item { display: flex; gap: 1.25rem; align-items: baseline; }
.ramp-phase { font-family: var(--serif); font-size: 0.95rem; font-weight: 700; color: var(--accent); white-space: nowrap; min-width: 80px; }
.ramp-focus { color: var(--muted); font-size: 0.92rem; }

/* ── CONTACT ── */
.contact { padding: 3rem 0; text-align: center; }
.contact h2 { font-family: var(--serif); font-size: 1.75rem; margin-bottom: 0.75rem; }
.contact p { color: var(--muted); margin-bottom: 1.5rem; }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
.contact-links a { padding: 0.6rem 1.2rem; border: 1px solid var(--border); border-radius: 20px; font-size: 0.85rem; font-weight: 600; transition: all 0.2s; }
.contact-links a:hover { border-color: var(--accent); color: var(--accent); }
.contact-links a.primary { background: var(--accent); color: #fff; border-color: transparent; }

/* ── FOOTER ── */
.footer { padding: 1.5rem 0; text-align: center; color: var(--muted); font-size: 0.78rem; border-top: 1px solid var(--border); }

@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: 1fr; }
  .contrib { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}
