/* ==========================================================================
   David Kaufman — personal site
   Design concept: wayfinding / transit-line system.
   Navigation reads like a line map — each page is a "stop."
   ========================================================================== */

:root {
  --ink: #14181c;
  --paper: #f4f2ec;
  --paper-dim: #e7e3d8;
  --muted: #7d8790;
  --line-amber: #e8a33d;
  --line-teal: #3f8f83;
  --line-red: #b85450;
  --line-blue: #4c7aa8;
  --radius: 3px;
  --max: 74ch;
  --gutter: clamp(1.5rem, 5vw, 4rem);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

@font-face {
  font-family: "Archivo";
  src: local("Archivo");
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.06rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 0.6em;
}

p { max-width: var(--max); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--line-blue);
  outline-offset: 2px;
}

/* ---------- Line map header / nav ---------- */

.line-header {
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.line-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  white-space: nowrap;
}

.wordmark__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
}

/* primary nav */
.linemap {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.linemap a {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  padding: 0.5rem 0.85rem;
  border-bottom: 2px solid transparent;
}

.linemap a[aria-current="page"] {
  color: var(--line-teal);
  border-bottom-color: var(--line-teal);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
  .linemap {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 3px solid var(--ink);
    padding: 0.5rem var(--gutter) 1rem;
  }
  .linemap::before { display: none; }
  .linemap.is-open { display: flex; }
  .linemap a { padding: 0.65rem 0.25rem; }
}

/* ---------- Layout shells ---------- */

main { display: block; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.section--divider {
  border-top: 1px solid var(--paper-dim);
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem);
  border-bottom: 3px solid var(--ink);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--line-teal);
  margin: 0 0 1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
}

.hero__lede {
  font-size: 1.2rem;
  color: #3a3f44;
}

.hero__portrait {
  border-radius: var(--radius);
  border: 3px solid var(--ink);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.hero__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Route stops (used for lists of facts / values) ---------- */

.stops {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-left: 3px solid var(--ink);
}

.stops li {
  position: relative;
  padding: 0 0 1.75rem 1.75rem;
}

.stops li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 0.3rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--ink);
}

.stops li:last-child { padding-bottom: 0; }

.stops h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.stops p { margin: 0; color: #3a3f44; }

/* ---------- Cards (projects) ---------- */

.project-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.project {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: start;
  background: var(--paper);
}

@media (max-width: 640px) {
  .project { grid-template-columns: 1fr; }
}

.project__status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: none;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  display: inline-block;
  border: 2px solid currentColor;
  width: fit-content;
}

.status-active { color: var(--line-teal); }
.status-planning { color: var(--line-amber); }
.status-paused { color: var(--muted); }

.project h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.project p { margin: 0; color: #3a3f44; }

.project__tags {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.project__tags span {
  border: 1px solid var(--muted);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  color: #52585e;
}

/* ---------- Buttons / links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover { background: transparent; color: var(--ink); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.text-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

/* ---------- Forms ---------- */

.form {
  max-width: 46ch;
  margin-top: 2rem;
  display: grid;
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
}

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}

.field textarea { min-height: 140px; }

.form__note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.form-status {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: none;
}

.form-status.is-visible { display: block; }
.form-status.is-success { background: #e2efe9; color: #245d4e; border: 1px solid #245d4e; }
.form-status.is-error { background: #f4e3e1; color: #7c2e2a; border: 1px solid #7c2e2a; }

/* honeypot field, hidden from sighted + AT users */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */

.line-footer {
  border-top: 3px solid var(--ink);
  margin-top: clamp(3rem, 8vw, 5rem);
  padding: 2.25rem 0 3rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
}

.line-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: baseline;
}

.line-footer a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Misc page bits ---------- */

.kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--line-teal);
  margin-bottom: 0.75rem;
}

.page-title {
  font-size: clamp(2rem, 5vw, 2.9rem);
  border-bottom: 3px solid var(--ink);
  padding-bottom: 1.5rem;
}

.callout {
  border: 2px dashed var(--muted);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-top: 2rem;
  color: #3a3f44;
}

.family-card {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.family-card__text h3 { margin-bottom: 0.3rem; }
.family-card__text p { margin: 0; color: #3a3f44; max-width: 46ch; }
