/* ============================================================
   nickjhardy.com — editorial, typography-led. no frameworks.
   ============================================================ */

:root {
  --paper: #faf8f3;
  --paper-dim: #f2efe8;
  --ink: #161512;
  --ink-soft: #4c4a44;
  --ink-faint: #8b887f;
  --rule: #e0dcd2;
  --rule-dark: #c9c4b6;
  --accent: #1d3fbd;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --nav-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 28px); }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 450;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(29, 63, 189, 0.14); }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.container { max-width: 880px; margin: 0 auto; padding: 0 28px; }

a { color: inherit; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(250, 248, 243, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-inner {
  max-width: 880px; margin: 0 auto; padding: 0 28px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 19px; font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom-color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.cmdk-hint {
  font-size: 11px;
  color: var(--ink-faint);
  background: none;
  border: 1px solid var(--rule-dark);
  border-radius: 5px;
  padding: 3px 8px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.cmdk-hint:hover { color: var(--ink); border-color: var(--ink-faint); }

.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-burger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--ink); margin: 5px 0;
  transition: transform 0.25s, opacity 0.25s;
}

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center;
  background: var(--ink);
  color: var(--paper);
  padding: 11px 22px;
  border-radius: 3px;
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}
.btn:hover { background: #33312b; }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }

.link-arrow {
  font-size: 14px; font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-dark);
  padding-bottom: 1px;
  transition: border-color 0.2s, color 0.2s;
}
.link-arrow:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: calc(var(--nav-h) + 110px) 0 110px; }
.hero-eyebrow {
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 26px;
}
.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(52px, 9vw, 92px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin-bottom: 26px;
}
.hero-tag {
  font-family: var(--font-serif);
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 620px;
  margin-bottom: 34px;
}
.hero-tag em {
  font-style: italic;
  color: var(--ink);
}
.hero-status {
  color: var(--ink-faint);
  margin-bottom: 40px;
  min-height: 20px;
}
.hero-status .dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: #2e7d4f;
  margin-right: 9px;
  vertical-align: 1px;
}
.caret {
  display: inline-block;
  width: 6px; height: 12px;
  background: var(--ink-faint);
  vertical-align: -1px;
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }

/* ---------- sections ---------- */
.section { padding: 78px 0; border-top: 1px solid var(--rule); }
.section-head {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: 48px;
}
.sec-no { color: var(--ink-faint); }
h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
h3 {
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.row-role {
  font-weight: 450;
  color: var(--ink-faint);
  font-size: 14.5px;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-copy p { color: var(--ink-soft); margin-bottom: 18px; font-size: 15.5px; }
.about-copy p:last-child { margin-bottom: 0; }
.about-copy .lede {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
}
.about-copy strong { font-weight: 600; color: var(--ink); }

.facts { display: flex; flex-direction: column; }
.fact {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 3px;
}
.fact:first-child { border-top: 1px solid var(--rule); }
.fact dt { color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; }
.fact dd { font-size: 14px; color: var(--ink); line-height: 1.5; }

/* ---------- rows (experience / work / leadership) ---------- */
.row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}
.row:last-of-type { border-bottom: none; }
.row-when {
  color: var(--ink-faint);
  padding-top: 3px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.now-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2e7d4f;
  border: 1px solid #b9d4c4;
  border-radius: 3px;
  padding: 1px 7px;
}
.row-body p { color: var(--ink-soft); font-size: 15px; }
.row-body ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.row-body li {
  color: var(--ink-soft); font-size: 15px;
  padding-left: 18px; position: relative;
}
.row-body li::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--rule-dark);
}

/* ---------- wins ---------- */
.win-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: start;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}
.win-row:last-of-type { border-bottom: none; }
.win-name {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.win-sub { color: var(--ink-soft); font-size: 14.5px; max-width: 520px; }
.win-outcome {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  padding-top: 6px;
}
.win-outcome .mono { color: var(--ink-faint); }
.win-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid #c4cdec;
  border-radius: 3px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* ---------- contact ---------- */
.section-contact { padding-bottom: 110px; }
.contact-lede {
  font-family: var(--font-serif);
  font-size: 21px;
  color: var(--ink-soft);
  margin: -18px 0 40px;
}
.contact-list { display: flex; flex-direction: column; max-width: 560px; }
.contact-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 15px 2px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  font-size: 15px;
  transition: background 0.15s, padding 0.15s;
}
.contact-item:first-child { border-top: 1px solid var(--rule); }
.contact-item .mono { color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; }
.contact-item span:last-child { font-weight: 500; }
.contact-item:hover { background: var(--paper-dim); padding-left: 10px; padding-right: 10px; }
.contact-item:hover span:last-child { color: var(--accent); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--rule); padding: 26px 0; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  color: var(--ink-faint);
  font-size: 11px;
}

/* ---------- command palette ---------- */
.cmdk { position: fixed; inset: 0; z-index: 100; }
.cmdk-backdrop {
  position: absolute; inset: 0;
  background: rgba(22, 21, 18, 0.28);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.cmdk-panel {
  position: relative;
  max-width: 480px;
  margin: 16vh auto 0;
  background: var(--paper);
  border: 1px solid var(--rule-dark);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 64px -16px rgba(22, 21, 18, 0.35);
  animation: cmdk-in 0.16s ease;
}
@keyframes cmdk-in { from { opacity: 0; transform: translateY(8px); } }
.cmdk-input {
  width: 100%;
  background: none; border: none; outline: none;
  color: var(--ink);
  font-size: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
}
.cmdk-input::placeholder { color: var(--ink-faint); }
.cmdk-list { max-height: 290px; overflow-y: auto; padding: 6px; }
.cmdk-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 13px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 13.5px;
}
.cmdk-item.sel { background: var(--paper-dim); color: var(--ink); }
.cmdk-item .k { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); }
.cmdk-foot {
  padding: 9px 18px;
  border-top: 1px solid var(--rule);
  font-size: 10.5px; color: var(--ink-faint);
  letter-spacing: 0.04em;
}

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

/* ---------- responsive ---------- */
@media (max-width: 780px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .row { grid-template-columns: 1fr; gap: 10px; padding: 22px 0; }
  .row-when { flex-direction: row; align-items: center; }
  .hero { padding: calc(var(--nav-h) + 70px) 0 80px; }
  .section { padding: 60px 0; }
}
@media (max-width: 700px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 4px 28px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; font-size: 15px; border-bottom: 1px solid var(--rule); }
  .nav-burger { display: block; }
  .nav-burger.open span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }
  .cmdk-hint { display: none; }
  .win-row { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
  .win-outcome { flex-direction: row; align-items: center; padding-top: 0; }
  .contact-item { grid-template-columns: 80px 1fr; }
}

/* ---------- landing-only layout ---------- */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; display: flex; align-items: center; }
.hero { width: 100%; padding: calc(var(--nav-h) + 20px) 0 60px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
