@import url("./site-palette.css");

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 24%),
    radial-gradient(circle at 82% 12%, var(--page-warm-glow), transparent 18%),
    linear-gradient(180deg, var(--page-bg-start) 0%, var(--page-bg-end) 100%);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--topbar-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.brand,
.topbar-links a {
  color: var(--topbar-link);
  text-decoration: none;
}

.brand {
  font-family: "Iowan Old Style", "Baskerville", serif;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

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

.topbar-links a {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead {
  padding: 4rem 1.5rem 3rem;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(180deg, #0f1729 0%, #172238 100%);
  color: #f4f8ff;
  text-align: center;
}

.masthead-kicker,
.eyebrow,
.panel-title,
.section-label {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.masthead h1 {
  width: min(960px, 100%);
  margin: 1rem auto 1.2rem;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  font-family: "Iowan Old Style", "Baskerville", serif;
  font-weight: 600;
}

.masthead-summary {
  width: min(760px, 100%);
  margin: 0 auto;
  color: rgba(232, 239, 255, 0.76);
  font-size: 1.03rem;
  line-height: 1.85;
}

.masthead-actions,
.masthead-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.masthead-actions {
  margin-top: 1.6rem;
}

.masthead-tags {
  margin-top: 1.35rem;
}

.masthead-tags span,
.tag-row span {
  padding: 0.62rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 248, 255, 0.86);
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.page {
  width: min(1240px, calc(100% - 2rem));
  margin: 1.35rem auto 0;
  padding-bottom: 3.75rem;
}

.home-page {
  display: grid;
  gap: 1.35rem;
}

.home-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.metric-card,
.section-card,
.overview-copy,
.overview-panel,
.narrative,
.evidence,
.project-card,
.mini-card,
.contact-card,
.side-callout,
.note-card {
  border: 1px solid var(--card-border);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.metric-card {
  padding: 1.1rem 1.25rem;
}

.metric-card span,
.metrics span {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--navy);
  font-size: 1.7rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-family: "Iowan Old Style", "Baskerville", serif;
}

.metric-card p,
.metrics p {
  margin: 0;
  color: #66789a;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.69rem;
}

.section-card {
  padding: 1.7rem;
}

.section-heading {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.25rem;
}

.section-heading h2,
.overview-copy h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3.4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-family: "Iowan Old Style", "Baskerville", serif;
  font-weight: 600;
}

.section-summary,
.lead,
.project-card p,
.mini-card p,
.contact-card p,
.note-card p {
  color: var(--muted);
  line-height: 1.8;
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1rem;
}

.prose-stack,
.stacked-cards,
.mini-grid {
  display: grid;
  gap: 1rem;
}

.prose-stack p,
.narrative p {
  margin: 0 0 1.2rem;
  color: #22304a;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card,
.mini-card,
.contact-card,
.side-callout,
.note-card {
  padding: 1.25rem;
}

.project-card h3,
.mini-card h3,
.contact-card h3,
.side-callout h3,
.chapter h3 {
  margin: 0.45rem 0 0.7rem;
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-family: "Iowan Old Style", "Baskerville", serif;
  font-weight: 600;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 1.1rem;
}

.tag-row span {
  border-color: rgba(24, 33, 49, 0.08);
  background: rgba(255, 255, 255, 0.75);
  color: #445067;
}

.side-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
}

.contact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.column-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.72fr);
  gap: 1.5rem;
  align-items: start;
}

.left-column,
.right-column {
  display: grid;
  gap: 1.4rem;
  align-content: start;
}

.overview-copy {
  padding: 2.15rem 2.2rem 2.3rem;
}

.overview-panel {
  padding: 1.35rem;
  background:
    linear-gradient(180deg, rgba(225, 234, 246, 0.92), rgba(247, 249, 252, 0.98));
  box-shadow:
    0 22px 55px rgba(18, 29, 56, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.panel-block {
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}

.panel-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.panel-block p:last-child {
  margin: 0.42rem 0 0;
  color: #586783;
  line-height: 1.72;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.metrics div {
  padding: 0.85rem;
  border: 1px solid rgba(136, 169, 216, 0.2);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.92));
}

.panel-links {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.narrative,
.evidence {
  padding: 1.7rem;
}

.narrative {
  font-size: 1.03rem;
  line-height: 1.9;
}

.chapter + .chapter {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.chapter ul,
.narrative ul {
  margin: 0.1rem 0 0;
  padding-left: 1.1rem;
  color: #22304a;
}

.chapter li,
.narrative li {
  margin: 0 0 0.65rem;
  line-height: 1.8;
}

.section-label {
  margin-bottom: 1rem;
}

blockquote {
  margin: 1.7rem 0 0;
  padding: 1rem 1.2rem;
  border-left: 2px solid rgba(200, 161, 106, 0.72);
  background: linear-gradient(90deg, rgba(200, 161, 106, 0.12), transparent 78%);
  color: #4c4034;
  font-family: "Iowan Old Style", "Baskerville", serif;
  font-size: 1.12rem;
  font-style: italic;
  line-height: 1.68;
}

.evidence {
  display: grid;
  gap: 1rem;
}

#evidence-cards {
  display: grid;
  gap: 1rem;
}

.figure-card {
  margin: 0;
  padding: 0.9rem;
  border: 1px solid rgba(24, 33, 49, 0.07);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(246, 248, 250, 0.98));
}

.figure-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.figure-card figcaption {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.note-card p:last-child,
.mini-card p:last-child,
.project-card p:last-child,
.contact-card p:last-child {
  margin-bottom: 0;
}

.text-link,
.action-button {
  text-decoration: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
  color: #324566;
  font-size: 0.94rem;
  font-weight: 600;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.78rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.action-button.primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  color: #f4f8ff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.action-button.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 248, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-button.compact {
  width: fit-content;
  margin-top: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1060px) {
  .project-grid,
  .contact-row,
  .home-metrics,
  .metrics {
    grid-template-columns: 1fr;
  }

  .home-split,
  .side-grid,
  .column-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .masthead {
    padding-top: 3.2rem;
  }

  .section-card,
  .narrative,
  .evidence,
  .overview-copy,
  .overview-panel {
    padding: 1.2rem;
    border-radius: 22px;
  }

  .page {
    width: min(100% - 1rem, 1240px);
  }

  .topbar-links {
    gap: 0.75rem;
  }
}
