/* Lakehouse Editorial — shared portfolio foundation.
   Harbor is the default theme on Home, About, Résumé, Contact, the catalog, and the case study. */

:root {
  --abyss: #e3e8e4;
  --dusk: #f0f2ed;
  --surface: #f8f6f0;
  --surface-2: #eef3ef;
  --horizon: #d7e5dc;
  --brass: #c9892f;
  --brass-bright: #96601b;
  --verdigris: #547b86;
  --parchment: #fffdf8;
  --parchment-ink: #1f2b26;
  --text-hi: #1f2b26;
  --text-lo: #5d6862;
  --line: rgba(31, 90, 63, 0.24);
  --line-soft: rgba(31, 43, 38, 0.12);
  --forest: #24583d;
  --forest-dark: #183e2a;
  --lake: #547b86;
  --ochre: #c9892f;
  --terracotta: #b9664d;
  --paper: #fffdf8;
  --font-display: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Avenir Next", Avenir, "Century Gothic", "Trebuchet MS", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 38em;
  --shell: 1000px;
}

html[data-theme="harbor"] {
  --abyss: #d9e3e6;
  --dusk: #eaf0f1;
  --surface: #f7faf9;
  --surface-2: #e2ecee;
  --horizon: #bdd5da;
  --brass: #d9902f;
  --brass-bright: #925a11;
  --verdigris: #276b75;
  --parchment: #ffffff;
  --parchment-ink: #14282d;
  --text-hi: #14282d;
  --text-lo: #52666b;
  --line: rgba(20, 40, 45, 0.22);
  --line-soft: rgba(20, 40, 45, 0.11);
  --forest: #17616a;
  --forest-dark: #10444b;
  --lake: #276b75;
  --ochre: #d9902f;
  --terracotta: #b75e49;
  --paper: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--abyss);
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 5.5rem;
}

body {
  margin: 0;
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  background:
    radial-gradient(ellipse 60% 24% at 50% 0%, var(--horizon), transparent 72%),
    var(--abyss);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--brass);
  color: var(--parchment-ink);
}

a {
  color: var(--brass-bright);
}

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text-hi);
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 5vw, 3.45rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

p {
  margin: 0;
}

.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 200;
  padding: 0.45rem 0.75rem;
  background: var(--forest);
  color: #fff;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 80;
  width: min(var(--shell), 100%);
  padding: 1.15rem 2rem;
  background: rgba(255, 253, 248, 0.96);
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
  box-shadow: 0 8px 24px rgba(31, 43, 38, 0.06);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

html[data-theme="harbor"] .site-nav {
  background: rgba(255, 255, 255, 0.96);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 1.2;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-hi);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.logo-mark {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest), var(--lake));
}

.nav-logo:hover {
  color: var(--forest);
  text-decoration: underline;
}

.nav-links a {
  margin-left: 2rem;
  color: var(--text-lo);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--forest);
  text-decoration: underline;
}

.nav-links a[aria-current="page"] {
  font-weight: 600;
  text-decoration: none;
}

.page-shell {
  display: flex;
  flex-direction: column;
  width: min(var(--shell), 100%);
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-right: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
  box-shadow: 0 24px 70px rgba(31, 43, 38, 0.1);
}

.page-main {
  flex: 1;
  width: 100%;
  padding: 7.75rem clamp(1.35rem, 5vw, 4.5rem) 4.5rem;
}

.page-main.measure {
  max-width: 46rem;
}

.page-main.spare {
  max-width: 40rem;
}

.eyebrow,
.zone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 20px;
  font-size: 12.5px;
}

.zone {
  margin-bottom: 18px;
  font-size: 11px;
}

.zone::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--ochre);
}

.lede {
  max-width: var(--measure);
  margin-top: 16px;
  color: var(--text-lo);
  font-size: 1.08rem;
}

.role {
  margin-top: 0.45rem;
  color: var(--forest);
  font-size: 1.02rem;
  font-weight: 650;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.btn {
  display: inline-block;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button.btn {
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--forest);
  color: #fff;
}

.btn-primary:hover {
  background: var(--forest-dark);
}

.btn-ghost {
  border-color: var(--line);
  background: var(--paper);
  color: var(--forest);
}

.btn-ghost:hover {
  border-color: var(--forest);
  color: var(--forest-dark);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  margin-top: 38px;
  border-block: 1px solid var(--line-soft);
}

.stat-row.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-chip {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 14px 18px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-wrap: balance;
}

.stat-chip:last-child {
  border-right: 0;
}

.hero-shot,
.proof-shot {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(31, 43, 38, 0.06);
}

.hero-shot {
  margin-top: 64px;
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 48px rgba(31, 43, 38, 0.12);
}

.proof-shot {
  margin-top: 16px;
}

.browser-chrome {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--forest-dark);
}

.browser-chrome span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.hero-shot img,
.proof-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.status-pair {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
  align-items: stretch;
  margin-top: 26px;
}

.status-card {
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--paper);
}

.status-table {
  width: 100%;
  border-collapse: collapse;
}

.status-table td,
.status-table th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.94rem;
  text-align: left;
  vertical-align: top;
}

.status-table th {
  color: var(--text-lo);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-table tr:last-child td {
  border-bottom: none;
}

.pill {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.pill-shipped {
  background: #e1efe5;
  color: var(--forest);
}

.pill-hypothesis {
  background: #f5e8d2;
  color: #855516;
}

.pill-open {
  background: #e8ece9;
  color: var(--text-lo);
}

.risk-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 0;
  border-left: 4px solid var(--terracotta);
  border-radius: 4px;
  background: #f8ece7;
}

.risk-card .tag {
  color: #8e4937;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.risk-card h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
}

.risk-card p {
  color: var(--text-lo);
  font-size: 0.93rem;
  line-height: 1.55;
}

.risk-card .fail-modes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.fail-mode {
  position: relative;
  padding-left: 14px;
  color: var(--text-hi);
  font-size: 0.87rem;
}

.fail-mode::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--lake);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.footer-links a {
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--forest);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  border-color: var(--forest);
  color: var(--forest-dark);
}

.footer-close {
  max-width: var(--measure);
  margin-top: 32px;
  color: var(--text-lo);
  font-size: 0.96rem;
  line-height: 1.6;
}

.site-footer {
  padding: 1.75rem clamp(1.35rem, 5vw, 4.5rem) 2.25rem;
  border-top: 1px solid var(--line-soft);
  color: var(--text-lo);
  font-size: 0.92rem;
}

.site-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer a {
  color: var(--forest);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  color: var(--text-hi);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--text-hi);
  font-family: inherit;
  font-size: 1rem;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.form-note {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  padding: 0.9rem 1rem;
}

.form-note[hidden] {
  display: none;
}

.form-note.success {
  background: var(--surface-2);
  color: var(--forest);
}

.form-note.error {
  background: #f8ece7;
  color: #8e4937;
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

@media (max-width: 760px) {
  .site-nav {
    padding: 1rem 1.2rem;
  }

  .nav-links {
    display: flex;
    gap: 1rem;
  }

  .nav-links a {
    margin-left: 0;
    font-size: 0.84rem;
  }

  .stat-row {
    grid-template-columns: 1fr 1fr;
  }

  .stat-row.cols-3 {
    grid-template-columns: 1fr;
  }

  .stat-row.cols-3 .stat-chip {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .stat-row.cols-3 .stat-chip:last-child {
    border-bottom: 0;
  }

  .stat-chip:nth-child(2) {
    border-right: 0;
  }

  .stat-chip:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }

  .status-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .nav-logo {
    font-size: 0.94rem;
  }

  .nav-links a {
    font-size: 0.78rem;
  }

  .nav-links a:first-child {
    display: none;
  }

  .stat-row,
  .stat-row.cols-3 {
    grid-template-columns: 1fr;
  }

  .stat-chip {
    min-height: 56px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .stat-chip:last-child {
    border-bottom: 0;
  }
}

@media print {
  .site-nav,
  .skip-link,
  .site-footer,
  .reading-progress {
    display: none !important;
  }

  html,
  body {
    background: #fff !important;
  }

  .page-shell {
    width: auto;
    max-width: none;
    min-height: 0;
    border: none;
    background: #fff;
    box-shadow: none;
  }

  .page-main {
    padding: 0 !important;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
