/* ===== shiao.info — personal hub ===== */

:root {
  --bg: #0a0a0f;
  --bg-soft: #0f0f17;
  --bg-card: rgba(255, 255, 255, 0.025);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eaf0;
  --text-dim: #a4a8b3;
  --text-faint: #6c7080;
  --accent: #ff7a59;
  --accent-2: #fbbf24;
  --accent-3: #f472b6;
  --grad: linear-gradient(135deg, #ff7a59 0%, #fbbf24 45%, #f472b6 100%);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hand: 'Caveat', cursive;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

:root.light {
  --bg: #faf9f7;
  --bg-soft: #f4f3ef;
  --bg-card: rgba(0, 0, 0, 0.025);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #1a1b20;
  --text-dim: #4a4d56;
  --text-faint: #8a8d96;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}
a { color: inherit; text-decoration: none; }
code, pre, .mono { font-family: var(--mono); }

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

.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
}
:root.light .bg-grid {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}
.bg-glow {
  position: fixed; top: -25%; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 1000px; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(255,122,89,0.18) 0%, rgba(244,114,182,0.10) 35%, transparent 65%);
  filter: blur(40px);
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(10, 10, 15, 0.6);
  border-bottom: 1px solid var(--border);
}
:root.light .nav { background: rgba(250, 249, 247, 0.7); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--grad); color: #0a0a0f;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.logo-text { color: var(--text); }
.logo-tld { color: var(--text-faint); font-weight: 500; font-size: 14px; margin-left: -4px; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--text-dim); }
.nav-links a { transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.theme-toggle {
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 8px; cursor: pointer; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: rgba(255,255,255,0.06); }
:root.light .theme-toggle:hover { background: rgba(0,0,0,0.05); }
.icon-moon { display: none; }
:root.light .icon-sun { display: none; }
:root.light .icon-moon { display: block; }
.nav-mobile { display: none; background: transparent; border: 1px solid var(--border); border-radius: 10px; padding: 8px; cursor: pointer; flex-direction: column; gap: 4px; }
.nav-mobile span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.2s; }
.nav-mobile-menu { display: none; flex-direction: column; padding: 12px 24px 20px; gap: 14px; border-top: 1px solid var(--border); background: rgba(10, 10, 15, 0.95); }
:root.light .nav-mobile-menu { background: rgba(250, 249, 247, 0.95); }
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a { color: var(--text-dim); font-size: 15px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; transition: all 0.15s ease;
  white-space: nowrap; font-family: var(--sans);
}
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn-primary { background: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #ff8a6b; transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(255,122,89,0.5); }
.btn-ghost { background: var(--bg-card); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.22); }
:root.light .btn-ghost:hover { background: rgba(0,0,0,0.05); }

/* Hero */
.hero { padding: 100px 0 80px; position: relative; text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-avatar {
  width: 96px; height: 96px; position: relative;
  margin-bottom: 28px;
}
.avatar-ring {
  position: absolute; inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-inner {
  position: absolute; inset: 6px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 800;
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-tag {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.04; letter-spacing: -0.03em;
  font-weight: 800; margin: 0 0 22px;
  max-width: 800px;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: 18px; color: var(--text-dim);
  max-width: 580px; margin: 0 0 36px; line-height: 1.55;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Sections */
.section { padding: 88px 0; }
.section-alt {
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.018) 50%, transparent 100%);
}
:root.light .section-alt { background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.02) 50%, transparent 100%); }
.section-head { text-align: center; margin-bottom: 48px; max-width: 720px; margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(30px, 4.2vw, 44px); letter-spacing: -0.025em;
  line-height: 1.1; margin: 0 0 14px; font-weight: 700;
}
.section-head p { color: var(--text-dim); font-size: 17px; margin: 0; }

/* Prose */
.prose p { font-size: 17px; color: var(--text-dim); margin: 0 0 18px; }
.prose a { color: var(--accent); border-bottom: 1px dashed var(--border-strong); }
.prose a:hover { border-bottom-style: solid; }
.prose em { color: var(--text); font-style: italic; }

/* Now list */
.now-list { display: grid; gap: 14px; }
.now-item {
  display: grid; grid-template-columns: 24px 1fr; gap: 18px;
  padding: 22px 24px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); transition: 0.2s ease;
}
.now-item:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.now-icon { color: var(--accent); font-size: 16px; line-height: 1.7; }
.now-item h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.now-item h3 a { color: var(--accent); border-bottom: 1px dashed var(--border-strong); }
.now-item h3 a:hover { border-bottom-style: solid; }
.now-item p { margin: 0; color: var(--text-dim); font-size: 14.5px; }

/* Links grid */
.links-grid { display: grid; gap: 12px; }
.link-card {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 18px; align-items: center;
  padding: 18px 22px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); transition: all 0.2s ease;
}
.link-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  background: rgba(255,255,255,0.04);
}
:root.light .link-card:hover { background: rgba(0,0,0,0.04); }
.lc-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: color-mix(in srgb, var(--lc) 12%, transparent);
  color: var(--lc); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}
.lc-body h3 { margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.lc-body p { margin: 0; color: var(--text-faint); font-size: 13.5px; }
.lc-arrow { color: var(--text-faint); transition: transform 0.2s ease, color 0.2s ease; }
.link-card:hover .lc-arrow { color: var(--accent); transform: translate(2px, -2px); }

/* Closing */
.closing { padding: 64px 0 96px; }
.text-center { text-align: center; }
.handwritten {
  font-family: var(--hand); font-size: 32px;
  color: var(--accent); margin: 4px 0;
}
.handwritten.big { font-size: 48px; font-weight: 700; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 56px 0 0; margin-top: 32px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px; padding-bottom: 40px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { max-width: 320px; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.footer-col h4 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-faint); margin: 0 0 16px; font-weight: 600;
}
.footer-col a {
  display: block; color: var(--text-dim); font-size: 14.5px;
  padding: 5px 0; transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding: 22px 0; font-size: 13px; color: var(--text-faint); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--text-faint); }
.dim { color: var(--text-faint); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-mobile { display: flex; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 72px 0 56px; }
  .hero-sub { font-size: 16px; }
  .section { padding: 64px 0; }
}
@media (max-width: 520px) {
  .hero-title { font-size: 40px; }
  .handwritten.big { font-size: 38px; }
}
