/* =====================================================================
   Sicheng Shen - Personal site page styles

   Requires base.css to be loaded FIRST. base.css owns the brand tokens, the
   shell width, and the header. Do not redeclare any of them here: two
   declarations of one concept is exactly how the nav drifted before.
   ===================================================================== */

:root {
  /* Page-only tokens. The brand comes from base.css:
     --bg --paper --ink --ink-soft --muted --muted-soft --accent --border
     --border-soft --code-bg --font-body --w-container --nav-h */
  --font-mono:  "JetBrains Mono", "Consolas", "Courier New", monospace;

  --w-prose:     780px;

  --radius:     6px;
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  margin: 0;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 22px; }
li { margin: 4px 0; }
strong { font-weight: 600; }

/* =====================================================================
   PAGE CONTAINER
   ===================================================================== */
.page {
  max-width: var(--w-container);
  margin: 0 auto;
  padding: 0 32px;
}
.page.narrow {
  max-width: var(--w-prose);
}

/* =====================================================================
   HERO (landing page)
   ===================================================================== */
.hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border-soft);
}
.hero h1 {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 20px;
  color: var(--ink);
}
.hero .tagline {
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: var(--w-prose);
  margin: 0 0 12px;
  font-weight: 400;
}
.hero .sub {
  font-size: 16px;
  color: var(--muted);
  max-width: var(--w-prose);
  margin: 0 0 32px;
}
.hero .cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all 120ms;
  cursor: pointer;
  font-family: inherit;
}
.btn.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  text-decoration: none;
}
.btn.secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--border);
}
.btn.secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
  text-decoration: none;
}
.btn.large { padding: 14px 28px; font-size: 16px; }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-soft);
}
.section:last-of-type { border-bottom: none; }
.section h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin: 0 0 24px;
  font-weight: 600;
}
.section h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 24px;
  max-width: var(--w-prose);
}
.section .lead {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: var(--w-prose);
  margin: 0 0 20px;
}

/* =====================================================================
   ABOUT (prose block)
   ===================================================================== */
.prose {
  max-width: var(--w-prose);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.prose p { margin: 0 0 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); }

/* =====================================================================
   FEATURED WORK CARDS
   ===================================================================== */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 32px 0 0;
}
@media (min-width: 780px) {
  .work-grid { grid-template-columns: repeat(3, 1fr); }
}
.work-card {
  padding: 28px 26px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 150ms, transform 150ms, box-shadow 150ms;
}
.work-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.work-card .title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.work-card .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}
.work-card .desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* =====================================================================
   METRICS GRID
   ===================================================================== */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 32px 0 0;
}
@media (min-width: 640px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .metrics { grid-template-columns: repeat(6, 1fr); }
}
.metric {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.metric .value {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.metric .label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

/* =====================================================================
   EXPLORE list (what I'm open to)
   ===================================================================== */
.explore-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: var(--w-prose);
}
@media (min-width: 640px) {
  .explore-list { grid-template-columns: repeat(2, 1fr); }
}
.explore-list li {
  padding: 14px 16px 14px 32px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14.5px;
  color: var(--ink-soft);
  position: relative;
  line-height: 1.5;
  margin: 0;
}
.explore-list li::before {
  content: "→";
  position: absolute;
  left: 14px;
  color: var(--accent);
  font-weight: 700;
}

/* =====================================================================
   FINAL CTA BAND
   ===================================================================== */
.cta-band {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 40px;
  margin-top: 32px;
  max-width: var(--w-prose);
}
.cta-band .lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  padding: 40px 0 60px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  border-top: 1px solid var(--border-soft);
  margin-top: 40px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* =====================================================================
   CONTACT PAGE
   ===================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin: 32px 0;
}
@media (min-width: 860px) {
  .contact-layout { grid-template-columns: 1.5fr 1fr; gap: 56px; }
}
.contact-form {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 32px;
}
.contact-form .form-group {
  margin-bottom: 18px;
}
.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 120ms, box-shadow 120ms;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}
.contact-form .form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}
.contact-form .status {
  font-size: 14px;
  color: var(--muted);
}
.contact-form .status.success { color: var(--green); font-weight: 600; }
.contact-form .status.error   { color: var(--red);   font-weight: 600; }
.contact-form .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-alt {
  font-size: 15px;
}
.contact-alt h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.contact-alt ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.contact-alt li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink-soft);
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.contact-alt li:last-child { border-bottom: none; }
.contact-alt li .k {
  min-width: 76px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.contact-alt li .v {
  color: var(--ink-soft);
  font-size: 14.5px;
  flex: 1;
}
.contact-alt .interests {
  padding: 16px 20px;
  background: var(--code-bg);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 20px;
}
.contact-alt .interests strong {
  color: var(--ink-soft);
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =====================================================================
   PAGE HEADER (contact + other simple pages)
   ===================================================================== */
.page-header {
  padding: 60px 0 32px;
}
.page-header h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  color: var(--ink);
}
.page-header .tagline {
  font-size: 17px;
  color: var(--muted);
  max-width: var(--w-prose);
  margin: 0;
  line-height: 1.6;
}

/* =====================================================================
   Legacy shared components (kept for /private/* pages)
   ===================================================================== */
/* Same shell as .page — nav, sub-nav, and content must share one width and one
   gutter, or the header's left edge won't line up with the content's. This was
   720px/24px against a 1080px/32px nav, which misaligned by 180px per side. */
.container {
  max-width: var(--w-container);
  margin: 0 auto;
  padding: 64px 32px 80px;
  background: var(--paper);
  min-height: 100vh;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
header.top {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 16px;
  margin-bottom: 32px;
}
header.top h1 {
  font-size: 28px;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
header.top .tagline {
  color: var(--muted);
  font-size: 14px;
}
.nav-links {
  margin: 16px 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--accent); }
.link-card {
  display: block;
  padding: 16px 20px;
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.link-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.link-card .title { font-weight: 600; font-size: 16px; color: var(--ink); }
.link-card .desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.link-card .arrow { float: right; color: var(--muted); }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}
/* Mixed against --paper so the wash follows the theme — a fixed pastel would
   glare on a dark page. */
.badge.green { background: color-mix(in srgb, var(--green) 14%, var(--paper)); color: var(--green); }
.badge.blue  { background: color-mix(in srgb, var(--blue) 14%, var(--paper)); color: var(--blue); }
.badge.amber { background: color-mix(in srgb, var(--amber) 14%, var(--paper)); color: var(--amber); }
.footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.contact-list { list-style: none; padding: 0; }
.contact-list li { margin: 8px 0; font-size: 15px; }
.contact-list li .label {
  display: inline-block; min-width: 80px; color: var(--muted); font-size: 13px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.stat {
  padding: 12px 16px;
  background: var(--code-bg);
  border-radius: 4px;
  border-left: 3px solid var(--accent);
}
.stat .value { font-size: 20px; font-weight: 700; color: var(--ink); }
.stat .label { font-size: 12px; color: var(--muted); margin-top: 2px; }
