/* ============================================================
   Palette — "ledger & leaf": a trade manifest for a career that
   runs through tea and cinnamon export, credit ledgers, and
   production logs. Paper, not cream; copper, not terracotta.
   ============================================================ */
:root {
  --paper: #eef1e7;
  --paper-raised: #f8f9f3;
  --ink: #202a1f;
  --ink-soft: #565f52;
  --rule: #c7cdb8;
  --rule-strong: #9ba585;
  --copper: #b1602a;
  --copper-deep: #7c401c;
  --brass: #8d7a44;
  --focus: #3b6ea5;

  --font-display: "Iowan Old Style", "Sitka Text", "STIX Two Text", Cambria, Georgia, serif;
  --font-body: "Segoe UI", "Noto Sans", -apple-system, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;

  --max-width: 980px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14170f;
    --paper-raised: #1b1f15;
    --ink: #e9ead9;
    --ink-soft: #a3a891;
    --rule: #34392a;
    --rule-strong: #454b34;
    --copper: #e08a4c;
    --copper-deep: #f2a565;
    --brass: #b6a06a;
    --focus: #7fb0e0;
  }
}

:root[data-theme="dark"] {
  --paper: #14170f;
  --paper-raised: #1b1f15;
  --ink: #e9ead9;
  --ink-soft: #a3a891;
  --rule: #34392a;
  --rule-strong: #454b34;
  --copper: #e08a4c;
  --copper-deep: #f2a565;
  --brass: #b6a06a;
  --focus: #7fb0e0;
}

:root[data-theme="light"] {
  --paper: #eef1e7;
  --paper-raised: #f8f9f3;
  --ink: #202a1f;
  --ink-soft: #565f52;
  --rule: #c7cdb8;
  --rule-strong: #9ba585;
  --copper: #b1602a;
  --copper-deep: #7c401c;
  --brass: #8d7a44;
  --focus: #3b6ea5;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    repeating-linear-gradient(
      0deg,
      color-mix(in srgb, var(--ink) 3%, transparent) 0px,
      color-mix(in srgb, var(--ink) 3%, transparent) 1px,
      transparent 1px,
      transparent 34px
    ),
    var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
  text-wrap: balance;
  font-weight: 700;
}

p { margin: 0 0 1em; color: var(--ink-soft); max-width: 66ch; }
p strong { color: var(--ink); font-weight: 700; }

a { color: var(--copper-deep); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.6em;
}

/* Header — masthead, not a floating pill bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav {
  display: flex;
  gap: 2px;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 8px 14px;
}

.nav a:hover { color: var(--copper-deep); }

.nav-cta {
  color: var(--copper-deep) !important;
  border: 1px solid var(--copper-deep);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 20px;
  height: 1.5px;
  background: var(--ink);
}

/* Hero — masthead / cover sheet, left-set rather than centered */
.hero {
  padding: 76px 0 56px;
  border-bottom: 1px solid var(--rule);
}

.hero-inner { text-align: left; }

.avatar {
  width: 88px;
  height: 88px;
  margin: 0 0 28px;
  border: 1.5px solid var(--ink);
  object-fit: cover;
  display: block;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  margin-bottom: 0.25em;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--copper-deep);
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 0.6em;
}

.hero-sub {
  max-width: 560px;
  margin: 0 0 2em;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper) !important;
}

.btn-primary:hover { background: var(--copper-deep); border-color: var(--copper-deep); }

.btn-outline {
  background: transparent;
  color: var(--ink) !important;
}

.btn-outline:hover {
  border-color: var(--copper-deep);
  color: var(--copper-deep) !important;
}

.btn:active { transform: translateY(1px); }

/* Sections */
.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--rule);
}

.section.alt {
  background: color-mix(in srgb, var(--ink) 3%, var(--paper));
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 0.9em;
}

.lead {
  font-size: 1.08rem;
  max-width: 66ch;
}

/* Ledger entry numbering — reused across ventures, experience, education, certifications */
.card-grid { counter-reset: entry; }
.timeline { counter-reset: entry; }
.edu-grid { counter-reset: entry; }
.cert-grid { counter-reset: entry; }

.card, .timeline-item, .edu-item, .cert-item {
  counter-increment: entry;
}

.card::before,
.timeline-content::before,
.edu-item::before,
.cert-item::before {
  content: "No. " counter(entry, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--brass);
  margin-bottom: 0.7em;
}

/* Ventures */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.card {
  background: var(--paper-raised);
  padding: 30px;
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.card h3 { margin-bottom: 0.2em; font-size: 1.25rem; }

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-bottom: 0.9em;
}

.card-list {
  margin: 0 0 1.1em;
  padding-left: 1.2em;
  color: var(--ink-soft);
}

.card-list li { margin-bottom: 0.35em; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 5px 10px;
}

/* Experience — manifest line-items, no card chrome */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}

.timeline-item:first-child { border-top: none; padding-top: 0; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.timeline-content h3 { margin-bottom: 0.5em; font-size: 1.2rem; }

/* Education & Certifications */
.edu-grid, .cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.edu-item, .cert-item {
  background: var(--paper-raised);
  padding: 22px;
}

.edu-item h3 { font-size: 1.05rem; margin-bottom: 0.3em; }
.cert-item h4 { font-size: 0.96rem; margin-bottom: 0.3em; font-family: var(--font-display); }

.edu-item p:last-child, .cert-item p:last-child { margin-bottom: 0; }

.card-meta { }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px 40px;
}

.skill-group h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.9em;
  color: var(--brass);
  font-weight: 700;
}

/* Contact */
.contact-section { border-bottom: none; }

.contact-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  padding: 28px 0 40px;
}

.site-footer p {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Reveal-on-scroll: quiet, single easing, respects reduced motion */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    display: none;
  }

  .nav.open { display: flex; }

  .nav a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--rule);
  }

  .nav-toggle { display: flex; }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
