/* ─── TOKENS ─────────────────────────────── */
:root {
  --paper:    #f5f2ed;
  --paper2:   #efebe4;
  --white:    #ffffff;
  --ink:      #0d0d0d;
  --ink2:     #1e1e1e;
  --muted:    #6b6867;
  --rule:     #d8d3cc;
  --rule2:    #c8c2ba;
  --accent:   #1a4f2a;
  --accent2:  #2d8a4a;
  --highlight:#edf4ee;

  --f-display: 'Playfair Display', Georgia, serif;
  --f-body:    'DM Sans', sans-serif;
  --f-mono:    'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ─── NAV ─────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem clamp(1.5rem, 5vw, 4rem);
  background: rgba(245,242,237,0.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav-mark {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  font-family: var(--f-mono) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.07em;
  border: 1px solid var(--ink) !important;
  color: var(--ink) !important;
  padding: 0.5rem 1.25rem;
  transition: background 0.2s, color 0.2s !important;
}
.nav-cta:hover { background: var(--ink) !important; color: var(--paper) !important; }

/* ─── HERO ─────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--rule);
}

.hero-left {
  padding: clamp(5rem, 10vw, 8rem) clamp(1.5rem, 5vw, 4rem) 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--rule);
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 2rem; height: 1px;
  background: var(--accent2);
  flex-shrink: 0;
}

h1 {
  font-family: var(--f-display);
  font-size: clamp(4rem, 6vw, 6.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.75rem;
}
h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-wordmark {
  height: clamp(3rem, 5.5vw, 6rem);
  width: auto;
  display: inline-block;
  vertical-align: bottom;
}

.hero-role {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.hero-statement {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 3rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.8rem 1.75rem;
  transition: all 0.2s;
  cursor: pointer;
  letter-spacing: 0.01em;
}
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--accent); }
.btn-ghost { border: 1px solid var(--rule2); color: var(--muted); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* hero right — dark panel */
.hero-right {
  background: var(--ink2);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
  min-height: 100vh;
}

/* subtle dot grid */
.hero-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(45,138,74,0.18) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* large JP watermark */
.hero-right::after {
  content: 'JP';
  position: absolute;
  bottom: -3rem;
  right: -1rem;
  font-family: var(--f-display);
  font-size: 22rem;
  font-weight: 900;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.07);
}
.stat {
  background: rgba(11,11,11,0.6);
  padding: 1.5rem;
}
.stat-n {
  font-family: var(--f-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--paper);
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-l {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  display: block;
}

/* ─── SECTION BASE ────────────────────────── */
.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
}
.section-alt { background: var(--white); }
.section-tinted { background: var(--paper2); }
.section-dark { background: var(--ink2); }

.section-label {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

h2.section-heading {
  font-family: var(--f-display);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 3rem;
}
h2.section-heading em { font-style: italic; color: var(--accent); }

/* ─── CONVICTION QUOTE ─────────────────────── */
.conviction {
  background: var(--accent);
  padding: clamp(3.5rem, 7vw, 6rem) clamp(1.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
}
.conviction-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.conviction blockquote {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1.45;
  color: #fff;
  margin-bottom: 1.25rem;
}
.conviction blockquote strong {
  font-style: normal;
}
.conviction cite {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  font-style: normal;
}

/* ─── TALKS ───────────────────────────────── */
.talks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
}
.talk {
  padding: 2.75rem;
  border-right: 1px solid var(--rule);
  transition: background 0.2s;
}
.talk:last-child { border-right: none; }
.talk:hover { background: var(--highlight); }

.talk-num {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--accent2);
  margin-bottom: 1.25rem;
}
.talk-title {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 1rem;
}
.talk-desc {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.talk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--rule2);
  color: var(--muted);
}
.tag-accent {
  border-color: rgba(26,79,42,0.3);
  color: var(--accent);
}

/* ─── TOPICS ──────────────────────────────── */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
}
.topic {
  padding: 2.5rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background 0.2s;
}
.topic:nth-child(2n) { border-right: none; }
.topic:nth-child(3), .topic:nth-child(4) { border-bottom: none; }
.topic:hover { background: var(--highlight); }

.topic-label {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1rem;
  display: inline-block;
  border: 1px solid rgba(45,138,74,0.3);
  padding: 0.2rem 0.55rem;
}
.topic-name {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.topic-desc {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.8;
}

/* ─── WRITING ─────────────────────────────── */
.writing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--rule);
  gap: 0;
}
.writing-card {
  padding: 2.5rem;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.2s;
}
.writing-card:last-child { border-right: none; }
.writing-card:hover { background: var(--highlight); }

.writing-date {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.writing-title {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.writing-excerpt {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.75;
  flex: 1;
}
.writing-link {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--accent2);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.writing-link::after { content: '→'; }

/* ─── ENGAGEMENTS ─────────────────────────── */
.eng-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--rule);
  margin-top: 0;
}
.eng-table tr {
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s;
}
.eng-table tr:last-child { border-bottom: none; }
.eng-table tr:hover { background: var(--highlight); }
.eng-table td {
  padding: 1.4rem 1.75rem;
  vertical-align: middle;
}
.eng-year {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--accent2);
  white-space: nowrap;
  width: 5rem;
}
.eng-event {
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.eng-topic {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--muted);
}
.eng-loc {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

/* ─── ABOUT ───────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.about-text p {
  font-size: 0.97rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1.25rem;
}
.about-text p:last-child { margin-bottom: 0; }

.cred-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.cred-group-head {
  background: var(--paper2);
  padding: 0.6rem 1.25rem;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.cred-item {
  background: var(--white);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.cred-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
}
.cred-meta {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

/* ─── CONTACT ──────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.contact-heading {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 4.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.contact-heading em { font-style: italic; color: var(--accent); }

.contact-body {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 2rem;
}
.contact-note {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.contact-link {
  background: var(--white);
  padding: 1.4rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.2s;
}
.contact-link:hover { background: var(--highlight); }
.cl-label {
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.cl-detail {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.2rem;
}
.cl-arrow {
  font-size: 1rem;
  color: var(--muted);
  transition: color 0.2s;
}
.contact-link:hover .cl-arrow { color: var(--accent); }

/* ─── FOOTER ───────────────────────────────── */
footer {
  padding: 1.75rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-mark {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
footer p {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ─── SCROLL REVEAL ─────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* hero entrance */
.eyebrow      { animation: fadeUp 0.5s 0.1s ease both; }
h1            { animation: fadeUp 0.5s 0.2s ease both; }
.hero-role    { animation: fadeUp 0.5s 0.3s ease both; }
.hero-statement { animation: fadeUp 0.5s 0.4s ease both; }
.hero-actions { animation: fadeUp 0.5s 0.5s ease both; }
.hero-right   { animation: fadeUp 0.5s 0.3s ease both; }

/* ─── RESPONSIVE ───────────────────────────── */
@media (max-width: 1024px) {
  .topics-grid { grid-template-columns: 1fr 1fr; }
  .about-grid  { grid-template-columns: 1fr; gap: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .eyebrow, h1, .hero-role, .hero-statement, .hero-actions, .hero-right {
    animation: none; opacity: 1; transform: none;
  }
}

@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .hero-left { border-right: none; }
  .talks-grid { grid-template-columns: 1fr; }
  .talk { border-right: none; border-bottom: 1px solid var(--rule); }
  .talk:last-child { border-bottom: none; }
  .topics-grid { grid-template-columns: 1fr; }
  .topic { border-right: none; }
  .writing-grid { grid-template-columns: 1fr; }
  .writing-card { border-right: none; border-bottom: 1px solid var(--rule); }
  .writing-card:last-child { border-bottom: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .eng-table td.eng-topic,
  .eng-table td.eng-loc { display: none; }
  .nav-links li:not(:last-child) { display: none; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}
