/* Portfolio home — David Jin */
:root {
  --accent: #4f46e5;
  --ink: #16181d;
  --muted: #5c6470;
  --bg-soft: #f6f7f9;
  --line: #e5e8ee;
}

body { background: #fff; color: var(--ink); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); color: #fff;
  font-size: 0.8rem; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  color: #fff !important; background: var(--accent);
  padding: 8px 16px; border-radius: 8px;
}
.nav-cta:hover { opacity: 0.9; }

/* Hero */
.hero {
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(79,70,229,0.25), transparent 60%),
    radial-gradient(700px 380px at 10% 110%, rgba(79,70,229,0.12), transparent 60%),
    #0e1013;
  color: #f2f4f8;
  padding: 120px 0 96px;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: #a5b4fc; margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.12; letter-spacing: -0.03em; font-weight: 800;
  margin: 0 0 20px; max-width: 15ch;
}
.hero-sub { font-size: 1.12rem; color: #b6bdc9; max-width: 52ch; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-ghost-light { color: #f2f4f8; border-color: rgba(255,255,255,0.25); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.08); }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 24px; margin: 64px 0 0; padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.hero-stats dt { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.hero-stats dd { margin: 4px 0 0; color: #8b93a3; font-size: 0.92rem; }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px; }
.work-card {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: #fff; display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.work-card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(22,24,29,0.10); }
.work-thumb { position: relative; height: 210px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.work-tag {
  position: absolute; top: 12px; left: 12px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  background: rgba(255,255,255,0.9); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px; color: var(--muted);
}
.work-body { padding: 20px 22px 24px; }
.work-body h3 { margin: 0 0 8px; font-size: 1.15rem; letter-spacing: -0.01em; }
.work-body p { margin: 0 0 14px; color: var(--muted); font-size: 0.95rem; }
.work-link { color: var(--accent); font-weight: 600; font-size: 0.92rem; }

/* CSS-drawn thumbnails */
.thumb-mock { position: absolute; inset: 24px; border-radius: 10px; background: #fff; border: 1px solid var(--line); overflow: hidden; box-shadow: 0 8px 24px rgba(22,24,29,0.08); }
.mock-bar { height: 10px; background: #eef0f4; border-bottom: 1px solid var(--line); }
.mock-hero { height: 64px; margin: 12px; border-radius: 6px; }
.thumb-landing .mock-hero { background: linear-gradient(120deg, #c4622d, #e8a05c); }
.mock-cards { display: flex; gap: 8px; padding: 0 12px 12px; }
.mock-cards span { flex: 1; height: 34px; border-radius: 5px; background: #f1f3f7; }
.thumb-landing .mock-cards span { background: #f7ede2; }
.mock-side { position: absolute; top: 0; bottom: 0; left: 0; width: 26%; background: #eef0f4; border-right: 1px solid var(--line); }
.mock-main { position: absolute; top: 14px; bottom: 14px; left: calc(26% + 14px); right: 14px; display: flex; flex-direction: column; gap: 8px; }
.mock-main span { flex: 1; border-radius: 5px; background: #f1f3f7; }
.thumb-app .mock-main span:first-child { background: linear-gradient(120deg, #4f46e5, #818cf8); opacity: 0.85; }

/* About */
.section-alt { background: var(--bg-soft); }
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.about-grid p { color: var(--muted); margin: 0 0 16px; }
.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.service-list li {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; display: grid; gap: 4px;
}
.service-list strong { font-size: 0.98rem; letter-spacing: -0.01em; }
.service-list span { color: var(--muted); font-size: 0.88rem; }

/* Contact */
.contact-card {
  text-align: center;
  background:
    radial-gradient(600px 260px at 50% -20%, rgba(79,70,229,0.16), transparent 70%),
    #0e1013;
  color: #fff; border-radius: 20px; padding: 72px 24px;
}
.contact-card .section-title { color: #fff; }
.contact-card .section-sub { color: #b6bdc9; margin-inline: auto; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.88rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--ink); }

@media (max-width: 820px) {
  .work-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; gap: 18px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .section { padding: 64px 0; }
}
