/* malooka.com — the operator's memo
   Palette: paper white, ink, Arizona copper. Type: Archivo + IBM Plex Mono. */

:root {
  --paper: #FBFBF9;
  --paper-alt: #F3F2EE;
  --ink: #17191B;
  --ink-2: #565B60;
  --line: #E0DFDA;
  --copper: #A14D21;
  --copper-bright: #C97245;
  --ink-band: #17191B;
  --band-text: #F4F2EE;
  --measure: 62ch;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --shell: 72rem;
  /* left/right inset that centers a 72rem shell on wide screens */
  --shell-pad: max(var(--pad), calc((100vw - var(--shell)) / 2));
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131211;
    --paper-alt: #1B1A18;
    --ink: #ECE8E2;
    --ink-2: #A3A099;
    --line: #2E2C29;
    --copper: #C97245;
    --copper-bright: #D98B5F;
    --ink-band: #211E1B;
    --band-text: #ECE8E2;
  }
}

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

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--copper); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

.mono, .eyebrow, .wordmark, .topbar-loc, .topbar-links a,
.ledger-num, .ledger-label, .quote-label, .role-when,
.role-title, .footer-loc, .footer-fine {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem var(--shell-pad);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--ink);
}

.topbar-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.topbar-loc { color: var(--ink-2); }

/* ---------- hero ---------- */

.hero {
  padding: clamp(4rem, 12vh, 8rem) var(--shell-pad) clamp(3rem, 8vh, 5rem);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-size: clamp(2.9rem, 9vw, 6.5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
  animation: rise 0.7s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.5rem); }
  to   { opacity: 1; transform: none; }
}

.hero-sub {
  max-width: var(--measure);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-2);
  margin-bottom: 2.25rem;
}

.cta {
  display: inline-block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  padding: 0.8rem 1.4rem;
  border: 1.5px solid var(--copper);
  color: var(--copper);
}
.cta:hover {
  background: var(--copper);
  color: var(--paper);
  text-decoration: none;
}

/* ---------- ledger strip ---------- */

.ledger {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 var(--shell-pad);
}

.ledger-cell {
  padding: 1.4rem 1rem 1.3rem 0;
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}
.ledger-cell:first-child { border-left: none; padding-left: 0; }

.ledger-num {
  display: block;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.ledger-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}

/* ---------- quote band ---------- */

.quote-band {
  background: var(--ink-band);
  color: var(--band-text);
  margin-top: clamp(3rem, 8vh, 5rem);
  padding: clamp(3.5rem, 10vh, 6rem) var(--shell-pad);
  border-block: 1px solid var(--line);
}

.quote-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--copper-bright);
  margin-bottom: 2rem;
}

.quote-band blockquote {
  font-size: clamp(1.7rem, 4.5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  max-width: 28em;
}

.quote-kicker { color: var(--copper-bright); }

.quote-after {
  margin-top: 2.5rem;
  max-width: var(--measure);
  color: #B9B5AE;
  font-size: 1.05rem;
}

/* ---------- sections ---------- */

.section {
  padding: clamp(3.5rem, 9vh, 6rem) var(--shell-pad);
}

.section-alt {
  background: var(--paper-alt);
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.85rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--ink-2);
  margin-bottom: 3rem;
}

.section-mark {
  width: 2rem;
  height: 2px;
  background: var(--copper);
  flex-shrink: 0;
}

.section p { max-width: var(--measure); }
.section p + p { margin-top: 1.1rem; }

/* ---------- track record ---------- */

.role {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.role-when {
  font-size: 0.85rem;
  color: var(--copper);
  padding-top: 0.3rem;
}

.role-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.role-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  margin-top: 0.3rem;
}

.role-body p {
  color: var(--ink-2);
  margin-bottom: 0.9rem;
}

.role-body ul {
  list-style: none;
  max-width: var(--measure);
}

.role-body li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.7rem;
}

.role-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.55rem;
  height: 2px;
  background: var(--copper);
}

.edu {
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ---------- principles ---------- */

.principles {
  list-style: none;
  max-width: var(--measure);
}

.principles li {
  padding: 1.1rem 0 1.1rem 1.6rem;
  border-top: 1px solid var(--line);
  position: relative;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.45;
}
.principles li:last-child { border-bottom: 1px solid var(--line); }

.principles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.75em;
  width: 0.55rem;
  height: 2px;
  background: var(--copper);
}

/* ---------- engagements ---------- */

.engagements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3.5rem;
}

.engagements h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.engagements h3::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 2px;
  background: var(--copper);
  margin-right: 0.7rem;
  vertical-align: middle;
}

.engagements p { color: var(--ink-2); }

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

.footer {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 8vh, 5rem) var(--shell-pad) 3rem;
}

.footer-cta a {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--ink);
  border-bottom: 2px solid var(--copper);
  padding-bottom: 0.2rem;
}
.footer-cta a:hover { color: var(--copper); text-decoration: none; }

.footer-loc {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--ink-2);
}

.footer-personal {
  margin-top: 1.75rem;
  max-width: var(--measure);
  font-size: 0.9rem;
  color: var(--ink-2);
}

.footer-fine {
  margin-top: 2.5rem;
  font-size: 0.72rem;
  color: var(--ink-2);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .ledger { grid-template-columns: repeat(3, 1fr); }
  .ledger-cell:nth-child(4) { border-left: none; padding-left: 0; }
  .ledger-cell { border-top: 0; }
  .ledger-cell:nth-child(n+4) { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .topbar { flex-direction: column; gap: 0.4rem; }
  .ledger { grid-template-columns: 1fr 1fr; }
  .ledger-cell:nth-child(3) { border-left: none; padding-left: 0; }
  .ledger-cell:nth-child(odd) { border-left: none; padding-left: 0; }
  .ledger-cell:nth-child(even) { border-left: 1px solid var(--line); padding-left: 1rem; }
  .ledger-cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .role { grid-template-columns: 1fr; gap: 0.5rem; }
  .engagements { grid-template-columns: 1fr; }
}
