/* ==========================================================================
   KARABO SISHUBA — PORTFOLIO STYLESHEET

   Design concept: a working research notebook. Karabo's background is
   Economics before it was code — this reads like an annotated manuscript,
   not a SaaS dashboard. Paper, ink, a rust-red marginalia accent, serif
   headings, monospace for data and labels, flat surfaces and hairline
   rules instead of rounded cards and shadows.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --paper: #f1efe6;         /* base page — warm, slightly grey paper, not stock cream */
  --paper-deep: #e7e2d2;    /* card / note surfaces, one shade down from paper */
  --rule: #d2cbb7;          /* hairline rules */
  --rule-strong: #b9b09a;

  --ink: #211e19;           /* primary text */
  --ink-soft: #605a4c;      /* secondary text */
  --ink-faint: #9b937f;     /* tertiary / captions */

  --accent-pen: #2d4a63;    /* fountain-pen blue-black — links, structure */
  --accent-mark: #9a3a24;   /* rust-red marginalia — emphasis, labels */

  --sidebar-bg: #1d1a16;    /* warm near-black, not pure #000 */
  --sidebar-text: #f1efe6;
  --sidebar-muted: #9b9284;

  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --sidebar-width: 260px;
  --transition-smooth: all 0.15s ease-out;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  display: flex;
  min-height: 100vh;
}

::selection {
  background-color: var(--accent-mark);
  color: var(--paper);
}

/* ==========================================================================
   1. SIDEBAR — a nameplate, not a dashboard rail
   ========================================================================== */

body > aside {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  padding: 48px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  z-index: 100;
}

body > aside img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 0;
  border: 1px solid var(--sidebar-muted);
  transform: rotate(-1.5deg);
  margin-bottom: 20px;
}

body > aside h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--sidebar-text);
  margin-bottom: 2px;
}

body > aside > p {
  font-size: 0.85rem;
  color: var(--sidebar-muted);
  line-height: 1.5;
}

body > aside > p:last-of-type {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(241, 239, 230, 0.12);
  width: 100%;
}

body > aside nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  width: 100%;
}

/* Text Links */
.page-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  font-family: var(--font-mono);
}

.page-links a {
  position: relative;
  color: var(--sidebar-muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 7px 0 7px 16px;
  transition: var(--transition-smooth);
  border-left: 2px solid transparent;
}

.page-links a::before {
  content: "";
}

.page-links a:hover {
  color: var(--sidebar-text);
  border-left-color: var(--sidebar-muted);
}

.page-links a[aria-current="page"] {
  color: var(--paper);
  border-left-color: var(--accent-mark);
}

.page-links a[aria-current="page"]::before {
  content: "";
}

/* Icon Links Row */
.social-icons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  padding-top: 4px;
}

.social-icons a {
  color: var(--sidebar-muted);
  font-size: 1.05rem;
  transition: var(--transition-smooth);
}

.social-icons a:hover {
  color: var(--sidebar-text);
}

/* ==========================================================================
   2. MAIN WRAPPER
   ========================================================================== */

main {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 64px 6% 96px;
  max-width: 900px;
  width: 100%;
  color: var(--ink-soft);
}

section {
  padding: 52px 0;
  border-top: 1px solid var(--rule);
}

main > section:first-child {
  border-top: none;
  padding-top: 0;
}

/* ==========================================================================
   3. HERO
   ========================================================================== */

main > .hero {
  padding-bottom: 44px;
}

main > .hero h1 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-mark);
  margin-bottom: 18px;
}

main > .hero h2 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  max-width: 780px;
  margin-bottom: 20px;
}

main > .hero p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 620px;
  margin-bottom: 28px;
}

.hero-btn {
  display: inline-block;
  background-color: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.hero-btn:hover {
  background-color: var(--ink);
  color: var(--paper);
}

/* ==========================================================================
   4. TYPOGRAPHY STANDARDS
   ========================================================================== */

h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 22px;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

#mission p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 700px;
}

/* ==========================================================================
   5. PROJECT NOTES — flat index-card treatment, not rounded dark boxes
   ========================================================================== */

.high-spend, .Dependency {
  background-color: var(--paper-deep);
  border-left: 3px solid var(--accent-pen);
  border-radius: 0;
  padding: 30px 34px;
  margin-bottom: 28px;
}

.high-spend h4, .Dependency h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.high-spend p, .Dependency p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.high-spend b, .Dependency b {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-mark);
  font-weight: 600;
}

.high-spend img, .Dependency img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  object-fit: contain;
  background-color: var(--paper);
  padding: 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  margin: 16px 0;
  display: inline-block;
}

.high-spend i, .Dependency i {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: block;
  margin-top: 4px;
}

/* ==========================================================================
   6. SERVICES & BLOG PULL-QUOTE
   ========================================================================== */

#services {
  border-top: 1px solid var(--rule);
}

#services .hero {
  padding: 0;
  display: block;
}

#services .hero aside {
  background-color: transparent;
  border: none;
  border-left: 3px solid var(--accent-mark);
  border-radius: 0;
  padding: 4px 0 4px 24px;
  max-width: 520px;
  margin-top: 6px;
}

#services .hero aside h1 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-mark);
  margin-bottom: 10px;
}

#services .hero aside p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 14px;
}

#services .hero aside a {
  display: inline-block;
  color: var(--accent-pen);
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--accent-pen);
  padding-bottom: 1px;
  transition: var(--transition-smooth);
}

#services .hero aside a:hover {
  color: var(--accent-mark);
  border-bottom-color: var(--accent-mark);
}

/* ==========================================================================
   7. RESUME PAGE
   ========================================================================== */

.resume-header {
  padding-top: 0;
}

.resume-header h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.resume-header .role {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: var(--accent-mark);
  margin-bottom: 14px;
}

.resume-header .contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  font-family: var(--font-mono);
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.resume-header .contact-line span:not(:last-child)::after {
  content: "·";
  margin: 0 12px;
  color: var(--ink-faint);
}

main.resume section {
  padding: 40px 0;
}

main.resume section:last-of-type {
  border-bottom: none;
}

.resume-entry {
  background-color: transparent;
  border: none;
  border-left: 3px solid var(--rule-strong);
  border-radius: 0;
  padding: 4px 0 4px 26px;
  margin-bottom: 32px;
}

.resume-entry:last-child {
  margin-bottom: 0;
}

.resume-entry h3 {
  color: var(--ink);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.resume-entry .entry-sub {
  font-family: var(--font-mono);
  color: var(--accent-mark);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.resume-entry .entry-date {
  font-family: var(--font-mono);
  color: var(--ink-faint);
  font-size: 0.8rem;
  margin-bottom: 14px;
}

.resume-entry .entry-date i,
.resume-entry .entry-note i {
  font-style: normal;
}

.resume-entry .entry-note {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-faint);
  margin-top: 10px;
}

.resume-entry p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.resume-entry ul {
  margin-top: 10px;
  padding-left: 0;
  list-style: none;
}

.resume-entry ul li {
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.6;
  padding: 7px 0;
  border-top: 1px solid var(--rule);
}

.resume-entry ul li:first-child {
  border-top: none;
  padding-top: 0;
}

.resume-entry .credential-link {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--accent-pen);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 1px solid var(--accent-pen);
  padding-bottom: 1px;
  margin-top: 4px;
  transition: var(--transition-smooth);
}

.resume-entry .credential-link:hover {
  color: var(--accent-mark);
  border-bottom-color: var(--accent-mark);
}

/* Skills rendered as a spec sheet, not chips */
.skills-list {
  list-style: none;
  margin-top: 4px;
}

.skills-list li {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}

.skills-list li:first-child {
  border-top: none;
  padding-top: 0;
}

main.resume > section > p {
  color: var(--ink-soft);
}

/* ==========================================================================
   7b. ABOUT PAGE
   ========================================================================== */

.about-hero {
  padding-top: 0;
  padding-bottom: 44px;
}

.about-hero .hero-btn {
  text-decoration: none;
}

#story p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 700px;
  margin-bottom: 22px;
}

#story p:last-child {
  margin-bottom: 0;
}

/* Signature touch: dropped cap opens the bio, like an annotated manuscript */
#story p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--accent-mark);
  float: left;
  line-height: 0.8;
  padding-right: 8px;
  padding-top: 6px;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid var(--rule);
}

.focus-card {
  background-color: transparent;
  border: none;
  border-right: 1px solid var(--rule);
  padding: 28px 24px;
}

.focus-card:last-child {
  border-right: none;
}

.focus-card i {
  color: var(--accent-mark);
  font-size: 1.1rem;
  margin-bottom: 14px;
  display: block;
}

.focus-card h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.focus-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 0;
}

#connect a {
  color: var(--accent-pen);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-pen);
  padding-bottom: 1px;
}

#connect a:hover {
  color: var(--accent-mark);
  border-bottom-color: var(--accent-mark);
}

#connect .contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  font-family: var(--font-mono);
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 10px;
}

#connect .contact-line span:not(:last-child)::after {
  content: "·";
  margin: 0 12px;
  color: var(--ink-faint);
}

/* ==========================================================================
   8. STACKED MOBILE STREAMLINING
   ========================================================================== */

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  body > aside {
    position: static;
    width: 100%;
    padding: 28px 20px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    border-bottom: 1px solid rgba(241, 239, 230, 0.12);
  }

  body > aside img {
    width: 56px;
    height: 56px;
    margin-bottom: 0;
    transform: none;
  }

  body > aside h3,
  body > aside > p {
    display: none;
  }

  body > aside nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: auto;
    flex: 1;
  }

  .page-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 16px;
  }

  .page-links a {
    padding: 4px 0;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .page-links a:hover {
    border-left: none;
    border-bottom-color: var(--sidebar-muted);
  }

  .page-links a[aria-current="page"] {
    border-left: none;
    border-bottom-color: var(--accent-mark);
  }

  main {
    margin-left: 0;
    padding: 40px 20px 64px;
  }

  main > .hero h2 {
    font-size: 1.9rem;
  }

  #services .hero aside {
    max-width: 100%;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }

  .focus-card {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 22px 0;
  }

  .focus-card:last-child {
    border-bottom: none;
  }

  #connect .contact-line,
  .resume-header .contact-line {
    flex-direction: column;
    gap: 4px;
  }

  #connect .contact-line span:not(:last-child)::after,
  .resume-header .contact-line span:not(:last-child)::after {
    content: none;
  }

  #story p:first-of-type::first-letter {
    font-size: 2.6rem;
  }
}