/* Isaac André Akwue — personal site
   Quiet archive: warm paper, serif-led, mono data details. */

:root {
  --paper: #f6f4ee;
  --paper-deep: #efece3;
  --ink: #17150f;
  --muted: #6e6a5e;
  --faint: #a8a394;
  --accent: #0b7a75;
  --rule: #17150f;
  --max: 1180px;
  --gutter: clamp(22px, 6vw, 96px);
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--paper); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.mono {
  font-family: var(--mono);
  font-size: 0.78em;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.accent { color: var(--accent); }

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

/* ---------- header ---------- */

.site-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: clamp(20px, 3.4vh, 40px);
}

.site-head .wordmark {
  font-family: var(--mono);
  font-style: italic;
  font-size: 0.78em;
}

.head-id { display: grid; gap: 6px; }

.head-status {
  display: grid;
  gap: 2px;
  color: var(--muted);
}

.dot {
  color: var(--accent);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.25; } }

.site-nav { display: flex; gap: clamp(16px, 2.4vw, 34px); }

.site-nav a { border-bottom: 1px dotted transparent; padding-bottom: 2px; }
.site-nav a:hover { border-bottom-color: var(--accent); }

/* ---------- landing ---------- */

.landing {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(48px, 9vh, 110px);
}

.landing h1 {
  margin: 0 0 clamp(18px, 3vh, 32px);
  font-family: var(--mono);
  font-size: clamp(26px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.landing h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
}

.landing .positioning {
  max-width: 40ch;
  text-wrap: balance;
  margin: 0 0 clamp(26px, 4.4vh, 48px);
  font-size: clamp(17px, 1.6vw, 23px);
  line-height: 1.45;
}

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

.section {
  padding-top: 18px;
  padding-bottom: clamp(84px, 13vh, 170px);
  border-top: 2px dotted var(--rule);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: clamp(44px, 6.4vh, 84px);
}

.section-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78em;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.section-head .count { color: var(--faint); }

/* ---------- work ledger ---------- */

.ledger { display: grid; }

.ledger-row { border-bottom: 1px dotted var(--faint); }

.ledger-line {
  appearance: none;
  display: grid;
  grid-template-columns: 3.2ch minmax(0, 1fr) auto auto;
  gap: clamp(12px, 2vw, 30px);
  align-items: baseline;
  width: 100%;
  padding: 16px 0 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ledger-line .no { color: var(--faint); }

.ledger-line .title {
  font-family: var(--mono);
  font-size: clamp(15px, 1.35vw, 20px);
  font-weight: 500;
  line-height: 1.3;
  text-transform: lowercase;
  transition: color 0.15s ease;
}

.ledger-line:hover .title { color: var(--accent); }

.ledger-line .years {
  justify-self: end;
  color: var(--faint);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.ledger-line:hover .years,
.ledger-line[aria-expanded="true"] .years { color: var(--accent); }

.ledger-line .tag {
  color: var(--muted);
  justify-self: end;
  white-space: nowrap;
}

.ledger-line[aria-expanded="true"] .title { font-style: italic; }

.ledger-detail {
  display: none;
  grid-template-columns: minmax(0, 60ch) minmax(180px, 1fr);
  gap: clamp(20px, 3.6vw, 64px);
  padding: 6px 0 34px 0;
}

.ledger-detail.is-open { display: grid; animation: settle 0.35s ease both; }

@keyframes settle {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.ledger-detail p { margin: 0 0 14px; }
.ledger-detail p:last-child { margin-bottom: 0; }

.ledger-meta {
  display: grid;
  gap: 10px;
  align-content: start;
  color: var(--muted);
  padding-top: 6px;
}

.ledger-meta span { display: block; }
.ledger-meta .k { color: var(--faint); }

/* ---------- lab ---------- */

.lab-card {
  display: grid;
  grid-template-columns: minmax(0, 58ch) minmax(200px, 1fr);
  gap: clamp(20px, 3.6vw, 64px);
  align-items: start;
}

.lab-card h3 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: clamp(17px, 1.6vw, 24px);
  font-weight: 500;
  text-transform: lowercase;
}

.lab-card p { margin: 0 0 16px; max-width: 52ch; }

.lab-frame {
  position: relative;
  border: 1px dotted var(--faint);
  background: var(--paper-deep);
  min-height: 190px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted);
}

.lab-frame .bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 74px;
}

.lab-frame .bars i {
  flex: 1;
  background: var(--faint);
  opacity: 0.55;
  animation: breathe 3.8s ease-in-out infinite;
}

.lab-frame .bars i:nth-child(odd) { animation-delay: 1.1s; }
.lab-frame .bars i:nth-child(3n) { animation-delay: 2.2s; background: var(--accent); }

@keyframes breathe { 50% { transform: scaleY(0.72); transform-origin: bottom; } }

/* ---------- about ---------- */

.about-lede {
  max-width: 44ch;
  margin: 0 0 clamp(30px, 4.6vh, 52px);
  font-family: var(--mono);
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-transform: lowercase;
}

.about-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3.6vw, 60px);
  max-width: 58rem;
}

.about-cols p { margin: 0; color: var(--ink); }

.fact-grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 14px clamp(20px, 3vw, 44px);
  align-items: baseline;
  margin-top: clamp(34px, 5vh, 56px);
  max-width: 58rem;
  padding-top: 22px;
  border-top: 1px dotted var(--faint);
  color: var(--muted);
  line-height: 1.8;
}

.fact-grid .k { color: var(--faint); }

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

.contact-mail {
  display: inline-block;
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: clamp(19px, 2.6vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  border-bottom: 2px dotted var(--faint);
  padding-bottom: 4px;
}

.contact-mail:hover { border-bottom-color: var(--accent); }

.contact-links { display: flex; flex-wrap: wrap; gap: 12px 30px; margin-top: 8px; }

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 26px;
  padding-bottom: 34px;
  border-top: 2px dotted var(--rule);
  color: var(--muted);
}

/* ---------- reveal on scroll ---------- */

html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.is-in { opacity: 1; transform: none; }

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

@media (max-width: 760px) {
  .ledger-line { grid-template-columns: 3.2ch minmax(0, 1fr) auto; }
  .ledger-line .years { display: none; }
  .ledger-detail, .lab-card, .about-cols { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: 1fr; gap: 4px; }
  .fact-grid .k { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
