/* hxppk personal homepage — dark, mono-forward, single amber accent.
   Theme locked to dark. Mobile-first (H5). Reduced-motion honored. */

:root {
  --bg:        #0b0b0d;
  --bg-elev:   #131316;
  --text:      #ededee;
  --muted:     #9a9aa3;
  --faint:     #6b6b73;
  --line:      rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);
  --accent:    #e9b949;          /* amber, the only accent */
  --accent-ink:#1a1505;          /* readable text on amber */
  --accent-dim:rgba(233, 185, 73, 0.14);

  --radius:    12px;
  --radius-sm: 9px;
  --maxw:      1180px;
  --pad:       clamp(20px, 5vw, 56px);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--radius-sm); z-index: 100;
}
.skip:focus { left: 16px; top: 16px; }

/* ---------- shared layout ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 12vw, 140px) var(--pad);
}
.section-title {
  font-size: clamp(1.6rem, 4.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(28px, 5vw, 48px);
  line-height: 1.25;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  padding: 0 var(--pad);
  max-width: var(--maxw); margin: 0 auto;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
/* nav bar should span full width visually but stay aligned */
@supports (backdrop-filter: blur(1px)) {
  .nav { -webkit-backdrop-filter: blur(10px); }
}
.brand { display: inline-flex; align-items: center; gap: 7px; }
.brand-mark {
  font-family: var(--font-mono);
  font-weight: 600; font-size: 0.98rem; letter-spacing: 0.02em;
}
.brand-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 30px); }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem; color: var(--muted);
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-ext { color: var(--text) !important; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  overflow: hidden;
}
.hero-visual {
  position: absolute;
  inset: 0 0 0 38%;          /* right side; canvas fills this box */
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24%, #000);
          mask-image: linear-gradient(90deg, transparent, #000 24%, #000);
}
.hero-copy { position: relative; z-index: 1; padding: 96px 0 64px; max-width: 660px; }
.hero-name {
  font-family: var(--font-mono);
  font-size: 0.85rem; color: var(--accent);
  letter-spacing: 0.04em; margin: 0 0 22px;
}
.hero-headline {
  font-size: clamp(2.1rem, 5.2vw, 3.3rem);
  font-weight: 600; letter-spacing: -0.01em; line-height: 1.2;
  margin: 0 0 24px;
}
.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  color: var(--muted); margin: 0 0 36px; max-width: 34ch;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem; font-weight: 500; white-space: nowrap;
  padding: 12px 20px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #f1c768; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: rgba(255,255,255,0.03); }
.btn-lg { padding: 16px 28px; font-size: 0.95rem; }

/* ---------- work ---------- */
.work-list { list-style: none; margin: 0; padding: 0; }
.work-item {
  padding: clamp(26px, 4vw, 40px) 0;
  border-top: 1px solid var(--line);
}
.work-item:last-child { border-bottom: 1px solid var(--line); }
.work-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.work-name {
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 600;
  margin: 0; letter-spacing: -0.01em;
}
.work-link {
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent);
  display: inline-flex; align-items: center; gap: 5px;
}
.work-link .arrow { transition: transform 0.2s var(--ease); }
.work-link:hover .arrow { transform: translate(2px, -2px); }
.work-link.muted { color: var(--faint); }
.work-desc { color: var(--muted); margin: 0 0 16px; max-width: 60ch; }
.work-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.work-tags span {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--faint);
  padding: 4px 10px; border: 1px solid var(--line-soft); border-radius: 999px;
}

/* ---------- approach ---------- */
.approach { border-top: 1px solid var(--line-soft); }
.approach-grid {
  display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.approach-grid .section-title { margin-bottom: 0; }
.approach-points { display: grid; gap: 24px; }
.point { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.point-k {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent);
  padding-top: 3px;
}
.point p { margin: 0; font-size: clamp(1.02rem, 2.4vw, 1.22rem); color: var(--text); max-width: 46ch; }

/* ---------- contact ---------- */
.contact {
  text-align: center;
  border-top: 1px solid var(--line-soft);
}
.contact-title {
  font-size: clamp(1.9rem, 6vw, 3.2rem); font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 18px;
}
.contact-sub { color: var(--muted); margin: 0 auto 36px; max-width: 42ch; }

/* ---------- footer ---------- */
.footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 36px var(--pad) 56px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
}
.footer-links { display: flex; gap: 22px; }
.footer-links a {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted);
  transition: color 0.2s var(--ease);
}
.footer-links a:hover { color: var(--text); }
.footer-note { font-family: var(--font-mono); font-size: 0.78rem; }

/* ---------- reveal animation (enhancement only; visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.hero-headline.reveal { --d: 1; }
.hero-sub.reveal { --d: 2; }
.hero-cta.reveal { --d: 3; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- responsive / H5 ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { inset: 0; opacity: 0.55;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 78%, transparent);
            mask-image: linear-gradient(180deg, transparent, #000 30%, #000 78%, transparent); }
  .hero-copy { padding: 88px 0 72px; max-width: none; }
  .approach-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .nav-links a:not(.nav-ext) { display: none; }   /* keep nav single-line on phones */
  .hero-copy { padding-top: 80px; }
  .hero-sub { max-width: none; }
  .work-head { gap: 8px; }
  .btn { flex: 1 1 auto; }       /* full-width tappable CTAs on phones */
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 360px) {
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}
