/* ---------- tokens ---------- */
:root {
  --bg: #0c0c0e;
  --bg-soft: #131316;
  --line: rgba(239, 233, 221, 0.12);
  --line-strong: rgba(239, 233, 221, 0.24);
  --ink: #efe9dd;
  --ink-dim: #a8a29a;
  --ink-faint: #6f6a64;
  --accent: #e6b866;
  --accent-soft: rgba(230, 184, 102, 0.12);
  --serif: Georgia, "Songti SC", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

::selection { background: var(--accent); color: #0c0c0e; }

/* subtle film grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 56px);
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(12, 12, 14, 0.86), rgba(12, 12, 14, 0.4));
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease);
}
.topbar.stuck { border-bottom-color: var(--line); }

.monogram {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.14em;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  transition: border-color 0.3s, color 0.3s;
}
.monogram:hover { border-color: var(--accent); color: var(--accent); }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-size: 14px; }
.nav a { color: var(--ink-dim); transition: color 0.25s; position: relative; }
.nav a:hover { color: var(--ink); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }

.nav-cta {
  color: var(--ink) !important;
  border: 1px solid var(--line-strong);
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--accent); border-color: var(--accent); color: #0c0c0e !important; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 12vh, 130px) clamp(20px, 5vw, 56px) clamp(48px, 8vh, 90px);
}

.hero-glow {
  position: absolute;
  top: -10%;
  left: 40%;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 184, 102, 0.13), transparent 62%);
  filter: blur(20px);
  pointer-events: none;
  animation: breathe 12s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.75; transform: translate(-50%, 0) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -18px) scale(1.06); }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 28px;
  padding: 6px 14px 6px 12px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(239, 233, 221, 0.03);
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #7cd88a;
  box-shadow: 0 0 0 0 rgba(124, 216, 138, 0.6);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 216, 138, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(124, 216, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 216, 138, 0); }
}

h1 {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 7.6vw, 84px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h1 em {
  font-style: italic;
  color: var(--accent);
  background: linear-gradient(100deg, var(--accent), #f2d8a4 60%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  max-width: 39em;
  margin: 0 0 36px;
  font-size: clamp(15px, 1.6vw, 17.5px);
  color: var(--ink-dim);
  line-height: 1.9;
}

.actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  font-size: 14.5px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #0c0c0e; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- marquee strip ---------- */
.strip {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.strip-track {
  display: flex;
  gap: 34px;
  width: max-content;
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  animation: scroll 34s linear infinite;
}
.strip-track span:nth-child(even) { color: var(--accent); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 11vh, 118px) clamp(20px, 5vw, 56px);
}

.section-head { margin-bottom: 46px; }

.eyebrow {
  display: block;
  margin-bottom: 14px;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: -0.01em;
}

/* ---------- work cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-soft);
  transition: transform 0.5s var(--ease), border-color 0.4s, background 0.4s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: #17171b;
}

.card-visual {
  position: relative;
  height: 168px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  overflow: hidden;
}
.card-visual span {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(12, 12, 14, 0.55);
  z-index: 1;
}
.card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(12, 12, 14, 0.22) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: 0.5;
}
.v1 { background: linear-gradient(135deg, #e6b866, #c98f4e 55%, #8f5f2e); }
.v2 { background: linear-gradient(135deg, #b9c9a8, #7f9584 60%, #4e6b63); }
.v3 { background: linear-gradient(135deg, #d8c7bd, #a9968c 60%, #6f6259); }

.card-visual::before {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(12, 12, 14, 0.25);
  border-radius: 50%;
  transition: transform 0.8s var(--ease);
}
.card:hover .card-visual::before { transform: scale(1.25) translate(-8px, 12px); }

.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.card-body h3 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: 0.01em; }
.card-body p { margin: 0; font-size: 14px; color: var(--ink-dim); line-height: 1.8; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 0; padding: 0; list-style: none; }
.tags li {
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ---------- writing list ---------- */
.list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }

.list li a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 6px;
  border-bottom: 1px solid var(--line);
  transition: padding 0.45s var(--ease), background 0.4s, color 0.3s;
}
.list li a:hover {
  padding-left: 18px;
  padding-right: 18px;
  background: rgba(239, 233, 221, 0.025);
  color: var(--accent);
}
.list-title { font-size: clamp(15px, 1.9vw, 18px); }
.list-meta {
  flex: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.portrait {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--bg-soft);
}
.portrait-inner {
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-family: var(--serif);
  font-size: 44px;
  letter-spacing: 0.1em;
  color: rgba(12, 12, 14, 0.62);
  background: linear-gradient(150deg, #e6b866 0%, #cfa06a 42%, #96806e 100%);
  position: relative;
  overflow: hidden;
}
.portrait-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.35), transparent 55%);
}

.about-text p { margin: 0 0 18px; color: var(--ink-dim); font-size: 15.5px; line-height: 1.95; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px 28px;
  margin: 32px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.facts div { display: flex; flex-direction: column; gap: 4px; }
.facts dt { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.facts dd { margin: 0; font-size: 14.5px; color: var(--ink); }

/* ---------- contact ---------- */
.contact { padding-bottom: clamp(72px, 12vh, 130px); }
.contact-inner {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(32px, 6vw, 64px);
  background:
    radial-gradient(circle at 88% 8%, rgba(230, 184, 102, 0.1), transparent 52%),
    var(--bg-soft);
  text-align: center;
}
.contact h2 { margin-bottom: 16px; }
.contact p { margin: 0 auto 28px; max-width: 32em; color: var(--ink-dim); font-size: 15px; }

.mail {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(20px, 3.4vw, 32px);
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
}
.mail:hover { color: var(--accent); border-color: var(--accent); }

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 34px; font-size: 13.5px; }
.socials a { color: var(--ink-faint); transition: color 0.3s; }
.socials a:hover { color: var(--accent); }

/* ---------- footer ---------- */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px clamp(20px, 5vw, 56px) 40px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 200px; }
  .nav { gap: 14px; font-size: 13px; }
  .nav a:not(.nav-cta) { display: none; }
  .footer { flex-direction: column; }
  .list li a { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
