/* ==========================================================================
   Morgan Johnson-Quamina — portfolio
   Palette: white paper, near-black ink, three primaries used one-per-moment.
   Type: one family, weight contrast does the work.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #5f5f5f;
  --rule: #e2e2e2;

  --red: #e8302a;
  --blue: #1856e8;
  --yellow: #ffcb05;

  --gutter: clamp(1.5rem, 7vw, 8rem);
  --stack: clamp(4rem, 10vw, 9rem);

  --sans: "Helvetica Neue", Helvetica, Inter, "Segoe UI", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.55;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}

/* --- shared layout ------------------------------------------------------ */

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

.measure { max-width: 34em; }

section { padding-block: var(--stack); }

/* --- masthead ----------------------------------------------------------- */

.masthead {
  padding-block: 2.25rem 0;
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: baseline;
  justify-content: space-between;
}

.wordmark {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark:hover { color: var(--blue); }

.nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.9375rem;
  font-weight: 400;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}

.nav a:hover { border-bottom-color: var(--rule); }

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

/* --- the deco mark: a stepped fan of three primaries -------------------- */

.steps {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0 0 2.5rem;
}

.steps span {
  height: 0.55rem;
  display: block;
}

.steps span:nth-child(1) { width: clamp(9rem, 34vw, 22rem); background: var(--red); }
.steps span:nth-child(2) { width: clamp(6rem, 24vw, 15rem); background: var(--blue); }
.steps span:nth-child(3) { width: clamp(3rem, 14vw, 8rem);  background: var(--yellow); }

.steps--tight { margin-bottom: 1.75rem; }

/* --- type --------------------------------------------------------------- */

h1, h2, h3 { font-weight: 300; margin: 0; }

.hero__name {
  font-size: clamp(2.75rem, 9.5vw, 7.5rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
  font-weight: 300;
  margin: 0;
}

.hero__line {
  margin: 2rem 0 0;
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.875rem);
  line-height: 1.35;
  font-weight: 300;
  max-width: 26em;
}

.hero__meta {
  margin: 2.5rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.section-title {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}

.page-title {
  font-size: clamp(2.25rem, 1.5rem + 4vw, 5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}

.lede {
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 300;
  line-height: 1.4;
  max-width: 30em;
  margin: 0;
}

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); }
a:hover { color: var(--ink); }

/* --- rules -------------------------------------------------------------- */

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.rule--red   { border-top: 3px solid var(--red);    max-width: 5rem; }
.rule--blue  { border-top: 3px solid var(--blue);   max-width: 5rem; }
.rule--yellow{ border-top: 3px solid var(--yellow); max-width: 5rem; }

/* --- project blocks ----------------------------------------------------- */

.project {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  border-top: 1px solid var(--rule);
}

.project:first-of-type { border-top: 0; padding-top: 0; }

.project__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

@media (min-width: 56rem) {
  .project__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 4rem;
  }
}

.project__role {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

.project__name {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}

.project__facts {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  font-size: 0.9375rem;
}

.project__facts li {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule);
}

.project__facts dt, .project__facts .k {
  flex: 0 0 8rem;
  color: var(--ink-soft);
}

/* --- image slots (swap the div for an <img> when you have art) ---------- */

.slot {
  border: 1px dashed #c9c9c9;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: #9a9a9a;
  font-size: 0.875rem;
  line-height: 1.4;
}

.slot--tall { aspect-ratio: 3 / 4; }
.slot--wide { aspect-ratio: 16 / 9; }

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
}

figure { margin: 0; }

figcaption {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 0.65rem;
}

/* --- index list (section pages from home) ------------------------------- */

.index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.index-list li { border-bottom: 1px solid var(--rule); }

.index-list a {
  display: grid;
  gap: 0.5rem 2rem;
  padding: 1.75rem 0;
  text-decoration: none;
  color: var(--ink);
  align-items: baseline;
}

@media (min-width: 48rem) {
  .index-list a { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
}

.index-list a:hover .index-list__name { color: var(--blue); }

.index-list__name {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  font-weight: 300;
  line-height: 1.1;
}

.index-list__note { color: var(--ink-soft); font-size: 0.9375rem; margin: 0; }

/* --- contact ------------------------------------------------------------ */

.contact-links {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  font-size: 1.0625rem;
}

.contact-links a { text-decoration: none; border-bottom: 2px solid var(--yellow); padding-bottom: 0.15rem; }
.contact-links a:hover { border-bottom-color: var(--ink); }

/* --- footer ------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3.5rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
}

.foot a { color: var(--ink-soft); }

/* --- a11y --------------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  position: static;
  display: inline-block;
  margin: 1rem var(--gutter);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
