/*
 * Khetiwe Richards — personal site.
 * Bookish, considered, Penguin Press / New Yorker register.
 * Cream is the dominant surface. Dark is rare (hero + footer only).
 * Accent: dark teal. Headlines: Fraunces serif. Body: Inter.
 *
 * Hand-rebuilt as a single static site from the Lovable design.
 * No build step, no dependencies — edit the markup and CSS directly.
 */

/* ------------------------------------------------------------------ *
 * Design tokens
 * ------------------------------------------------------------------ */
:root {
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;

  /* Core palette (oklch — warm cream ground, dark teal accent, ink text) */
  --cream: oklch(0.965 0.018 85);
  --ink: oklch(0.20 0.012 60);
  --ink-muted: oklch(0.42 0.012 60);
  --ink-subtle: oklch(0.58 0.010 60);
  --rule: oklch(0.86 0.015 75);
  --teal: oklch(0.42 0.075 195);
  --teal-bright: oklch(0.58 0.115 195);
  --dark: oklch(0.18 0.012 60);
  --dark-foreground: oklch(0.95 0.015 85);
  --dark-muted: oklch(0.68 0.015 75);

  /* Lifted surfaces + shadows (used by the outcome cards) */
  --paper: oklch(0.985 0.01 85); /* card that lifts off the cream */
  --cream-soft: oklch(0.93 0.018 80); /* badge chip ground */
  --rule-faint: color-mix(in oklab, var(--ink) 8%, transparent);
  --r-md: 10px;
  --shadow: 0 1px 2px rgba(27, 33, 31, 0.05), 0 8px 24px rgba(27, 33, 31, 0.06);
  --shadow-lift: 0 2px 6px rgba(27, 33, 31, 0.08), 0 16px 40px rgba(27, 33, 31, 0.1);
}

/* ------------------------------------------------------------------ *
 * Base
 * ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

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

ul {
  list-style: none;
}

::selection {
  background-color: var(--teal);
  color: var(--cream);
}

/* ------------------------------------------------------------------ *
 * Layout primitives
 * ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: 5rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 2.5rem;
  }
  .section {
    padding-block: 7rem;
  }
  .section-header {
    margin-bottom: 1.75rem;
  }
}

/* ------------------------------------------------------------------ *
 * Type components
 * ------------------------------------------------------------------ */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
}

.display {
  font-family: var(--font-serif);
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30, "WONK" 0;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}

.display-dark {
  font-family: var(--font-serif);
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30, "WONK" 0;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--dark-foreground);
}

.section-header h2 {
  font-size: 1.875rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .section-header h2 {
    font-size: 3rem;
    line-height: 1.05;
  }
}

.prose-essay {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  max-width: 38rem;
}

.prose-essay p + p {
  margin-top: 1.4em;
}

/* ------------------------------------------------------------------ *
 * Links & buttons
 * ------------------------------------------------------------------ */
.link-quiet {
  color: var(--teal);
  border-bottom: 1px solid color-mix(in oklab, var(--teal) 35%, transparent);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.link-quiet:hover {
  color: var(--teal-bright);
  border-bottom-color: var(--teal-bright);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background-color: var(--teal);
  color: var(--cream);
  border-radius: 2px;
  transition: background-color 0.2s ease;
}
.btn-primary:hover {
  background-color: var(--teal-bright);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-ghost:hover {
  background-color: var(--ink);
  color: var(--cream);
}

/* ------------------------------------------------------------------ *
 * Nav
 * ------------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled {
  background-color: color-mix(in oklab, var(--cream) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--rule);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.nav .brand {
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}
.nav .brand:hover {
  color: var(--teal);
}
.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: var(--teal);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

/* ------------------------------------------------------------------ *
 * Hero (dark)
 * ------------------------------------------------------------------ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 65px);
  background-color: var(--dark);
  color: var(--dark-foreground);
}
.hero .container {
  padding-top: 8rem;
  padding-bottom: 5rem;
}
.hero .eyebrow {
  color: var(--dark-muted);
}
.hero h1 {
  margin-top: 1.5rem;
  max-width: 64rem;
  font-size: 2.4rem;
  line-height: 1.08;
}
.hero-resume {
  margin-top: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--dark-foreground);
}
.hero-resume span:first-child {
  border-bottom: 1px solid var(--dark-muted);
  padding-bottom: 0.25rem;
  transition: border-color 0.2s ease;
}
.hero-resume:hover span:first-child {
  border-bottom-color: var(--dark-foreground);
}
.hero-resume .arrow {
  transition: transform 0.2s ease;
}
.hero-resume:hover .arrow {
  transform: translateX(0.25rem);
}
.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--dark-muted);
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 3rem;
  }
}
@media (min-width: 768px) {
  .hero .container {
    padding-top: 10rem;
    padding-bottom: 7rem;
  }
  .hero h1 {
    font-size: 4.25rem;
    line-height: 1.05;
  }
}

/* ------------------------------------------------------------------ *
 * Outcomes
 * ------------------------------------------------------------------ */
.outcomes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.9rem, 2vw, 1.25rem);
}
.outcome {
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  border: 1px solid var(--rule-faint);
  border-radius: var(--r-md);
  padding: clamp(1.4rem, 3.5vw, 2rem);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.outcome:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.outcome .stat {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.6vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.outcome .outcome-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.outcome .outcome-body p:first-child {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink-muted);
  margin-bottom: 1.15rem;
}
.outcome .company {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background-color: var(--cream-soft);
  border: 1px solid var(--rule-faint);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

@media (min-width: 620px) {
  .outcomes-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ------------------------------------------------------------------ *
 * Building with AI
 * ------------------------------------------------------------------ */
.builds {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 3.5rem;
}
.build {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
.build h3 {
  margin-top: 0.75rem;
  font-size: 1.65rem;
}
.build .build-body {
  margin-top: 0.75rem;
  font-size: 0.98rem;
  line-height: 1.625;
  color: var(--ink-muted);
}
.build .link-quiet {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.875rem;
}
.stack-line {
  margin-top: 2rem;
  max-width: 42rem;
  font-size: 0.95rem;
  line-height: 1.625;
  color: var(--ink-muted);
  border-top: 1px solid var(--rule-faint);
  padding-top: 1.4rem;
}
.stack-line strong {
  color: var(--ink);
  font-weight: 600;
}
.tutoring-turn {
  margin-top: 5rem;
  border-top: 1px solid var(--rule);
  padding-top: 3rem;
}
.tutoring-turn h3 {
  font-size: 1.65rem;
  margin-bottom: 1.25rem;
}
.tutoring-turn .btn-primary {
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .tutoring-turn h3 {
    font-size: 2rem;
  }
}

@media (min-width: 768px) {
  .builds {
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
  }
  .build h3 {
    font-size: 1.85rem;
  }
}

/* ------------------------------------------------------------------ *
 * Bookshelf
 * ------------------------------------------------------------------ */
.bookshelf-intro {
  margin-top: 0;
  margin-bottom: 2.5rem;
}
.books {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
.book {
  display: flex;
  gap: 1.5rem;
}
.book-cover {
  position: relative;
  flex-shrink: 0;
}
.book-cover img {
  position: relative;
  height: 11rem;
  width: 7.3rem;
  object-fit: cover;
  /* Grounded downward shadow so it reads on cream beneath dark covers too,
     while staying small. */
  box-shadow: 0 5px 9px -2px rgba(27, 33, 31, 0.22);
}
.book-text h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--ink);
}
.book-text .author {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--teal);
}
.book-text .note {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.625;
  color: var(--ink-muted);
}

@media (min-width: 640px) {
  .book-cover img {
    height: 13rem;
    width: 8.7rem;
  }
}
@media (min-width: 768px) {
  .books {
    grid-template-columns: 1fr 1fr;
    column-gap: 3.5rem;
    row-gap: 4rem;
  }
  .book {
    gap: 1.75rem;
  }
  .book-text h3 {
    font-size: 1.5rem;
  }
}

/* ------------------------------------------------------------------ *
 * Connect — three doors
 * ------------------------------------------------------------------ */
.connect-primary {
  margin-top: 1rem;
}
.connect-primary h2 {
  max-width: 56rem;
  font-size: 1.875rem;
}
.connect-primary .prose-essay {
  margin-top: 1.75rem;
}
.connect-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.connect-resume {
  margin-top: 1rem;
  font-size: 0.875rem;
}
.connect-secondary {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.door {
  display: flex;
  flex-direction: column;
}
.door h3 {
  margin-top: 0;
  font-size: 1.5rem;
}
.door p {
  flex: 1;
  margin-top: 0.75rem;
  font-size: 0.98rem;
  line-height: 1.625;
  color: var(--ink-muted);
}
.door > .link-quiet {
  display: inline-block;
  align-self: flex-start;
  margin-top: 1rem;
  font-size: 0.875rem;
}
.door > .door-links {
  margin-top: 1rem;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .connect-primary h2 {
    font-size: 3.25rem;
    line-height: 1.05;
  }
  .connect-secondary {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

/* ------------------------------------------------------------------ *
 * Footer (dark)
 * ------------------------------------------------------------------ */
.footer {
  background-color: var(--dark);
  color: var(--dark-foreground);
}
.footer .container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-block: 4rem;
}
.footer .name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.footer .loc {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--dark-muted);
}
.footer-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--dark-muted);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.footer-links a {
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: var(--dark-foreground);
}
.footer .copy {
  font-size: 0.75rem;
  color: color-mix(in oklab, var(--dark-muted) 80%, transparent);
}

@media (min-width: 768px) {
  .footer .container {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding-block: 5rem;
  }
  .footer-right {
    align-items: flex-end;
  }
}
