@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&display=swap');

/* James Pelton — personal brand. Light, premium, fast. No build step. */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f6fb;
  --bg-tint: #eaeefc;
  --card: #ffffff;
  --line: #e6e8ef;
  --text: #14161c;
  --muted: #5a6172;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: #eef0ff;
  --ink: #0c0e14;
  --shadow: 0 1px 2px rgba(20,22,28,.04), 0 10px 30px rgba(20,22,28,.06);
  --shadow-lg: 0 2px 6px rgba(20,22,28,.05), 0 24px 60px rgba(38,40,90,.14);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1120px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; display: block; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 15px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-weight: 800; letter-spacing: -0.02em; color: var(--text); font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; font-size: 0.82rem; font-weight: 800; letter-spacing: -0.5px; box-shadow: 0 4px 12px rgba(79,70,229,.35); }
.brand span { color: var(--accent); }
.nav-links { display: flex; align-items: center; }
.nav-links a { color: var(--muted); margin-left: 24px; font-size: 0.95rem; font-weight: 550; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.btn-sm { background: var(--accent); color: #fff; padding: 8px 16px; border-radius: 9px; }
.nav-links a.btn-sm:hover { background: var(--accent-2); color: #fff; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -10% -10% auto -10%; height: 130%;
  background:
    radial-gradient(45% 55% at 82% 8%, rgba(124,92,255,.20) 0%, transparent 60%),
    radial-gradient(40% 50% at 12% 30%, rgba(79,70,229,.16) 0%, transparent 60%),
    radial-gradient(45% 45% at 60% 90%, rgba(99,102,241,.12) 0%, transparent 60%);
  filter: blur(10px); z-index: 0;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto; padding: 90px 24px 74px;
  display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 52px; align-items: center;
}
.eyebrow {
  display: inline-block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border: 1px solid #dcdcff;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.03; letter-spacing: -0.02em;
  margin: 0 0 20px; font-weight: 600; color: var(--ink);
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p.lead { font-size: 1.18rem; color: var(--muted); margin: 0 0 30px; max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 13px; }
.btn {
  display: inline-block; padding: 14px 24px; border-radius: 11px; font-weight: 650;
  font-size: 0.98rem; border: 1px solid transparent; transition: transform .14s ease, box-shadow .25s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 24px rgba(79,70,229,.32); }
.btn-primary:hover { box-shadow: 0 14px 32px rgba(79,70,229,.42); }
.btn-ghost { border-color: var(--line); color: var(--text); background: #fff; box-shadow: var(--shadow); }
.btn-lg { padding: 16px 30px; font-size: 1.04rem; }

/* Hero portrait */
.hero-photo { position: relative; }
.hero-photo::after {
  content: ""; position: absolute; inset: -18px; border-radius: 30px; z-index: -1;
  background: linear-gradient(135deg, rgba(79,70,229,.25), rgba(124,92,255,.16));
  filter: blur(30px);
}
.hero-photo img {
  width: 100%; border-radius: 22px; box-shadow: var(--shadow-lg);
  border: 6px solid #fff; object-fit: cover; aspect-ratio: 5/6;
}
.hero-photo .badge {
  position: absolute; bottom: -16px; left: -16px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 15px;
  padding: 12px 17px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 11px;
}
.hero-photo .badge .dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.hero-photo .badge b { font-size: 0.92rem; color: var(--text); }
.hero-photo .badge span { font-size: 0.8rem; color: var(--muted); display: block; }

/* Sections */
.section { padding: 74px 0; }
.section.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 3.2vw, 2.3rem); letter-spacing: -0.015em; margin: 0 0 8px; color: var(--ink); }
.section .sub { color: var(--muted); margin: 0 0 38px; font-size: 1.06rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.about-photo { position: relative; }
.about-photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 4/5; object-fit: cover; }
.about p { color: #333a48; margin: 0 0 16px; font-size: 1.06rem; }
.about h2 { margin-top: 6px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 17px 21px; flex: 1; min-width: 130px; box-shadow: var(--shadow); }
.stat .num { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--accent); letter-spacing: -0.02em; }
.stat .lbl { color: var(--muted); font-size: 0.88rem; }

/* Article cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 26px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: border-color .2s ease, transform .16s ease, box-shadow .25s ease;
  display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.card:hover { border-color: #c9c9f5; transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-tint); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card .tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.card h3 { font-family: var(--serif); font-weight: 600; margin: 0 0 10px; font-size: 1.24rem; letter-spacing: -0.01em; color: var(--ink); line-height: 1.28; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0 0 18px; flex: 1; }
.card .read { color: var(--accent); font-weight: 650; font-size: 0.9rem; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(120deg, #4f46e5, #7c3aed); color: #fff; }
.cta-band::before { content:""; position:absolute; inset:0; background: radial-gradient(40% 80% at 85% 20%, rgba(255,255,255,.18), transparent 60%), radial-gradient(30% 60% at 5% 90%, rgba(255,255,255,.12), transparent 60%); }
.cta-band .wrap { position: relative; padding: 66px 24px; text-align: center; }
.cta-band h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 0 0 12px; letter-spacing: -0.015em; color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); font-size: 1.12rem; max-width: 560px; margin: 0 auto 28px; }
.cta-band .btn-white { background: #fff; color: var(--accent); box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.cta-band .btn-white:hover { background: #f5f5ff; }

/* Article page */
.article { padding: 56px 0 66px; }
.article-head { max-width: 760px; margin: 0 auto 30px; }
.article-head .tag { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; }
.article-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -0.015em; margin: 14px 0 14px; color: var(--ink); }
.article-head .meta { color: var(--muted); font-size: 0.95rem; }
.article-hero { max-width: 920px; margin: 0 auto 42px; }
.article-hero img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 16/9; object-fit: cover; }
.article-body { max-width: 720px; margin: 0 auto; font-size: 1.1rem; }
.article-body p { color: #2c3340; margin: 0 0 22px; }
.article-body h2 { font-family: var(--serif); font-weight: 600; font-size: 1.55rem; letter-spacing: -0.01em; margin: 44px 0 14px; color: var(--ink); }
.article-body h3 { font-weight: 700; font-size: 1.2rem; margin: 30px 0 12px; color: var(--ink); }
.article-body ul, .article-body ol { color: #2c3340; margin: 0 0 22px; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  border-left: 4px solid var(--accent); margin: 28px 0; padding: 14px 20px 14px 22px;
  color: #3a4150; font-family: var(--serif); font-style: italic; font-size: 1.18rem;
  background: var(--accent-soft); border-radius: 0 12px 12px 0;
}
.article-body strong { color: var(--ink); }
.signoff { margin-top: 42px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--muted); }
.signoff .author { display: flex; align-items: center; gap: 14px; }
.signoff .author img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: var(--shadow); }
.signoff .author b { color: var(--text); display: block; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); font-size: 0.92rem; background: var(--bg-soft); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

.back { display: inline-block; margin-bottom: 24px; color: var(--muted); font-size: 0.92rem; }

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding-top: 58px; }
  .hero-photo { max-width: 360px; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-photo { max-width: 380px; }
  .nav-links a { margin-left: 15px; }
  .nav-links a.btn-sm { margin-left: 15px; }
}
