/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0c;
  --bg-alt: #101013;
  --ink: #eae7e0;
  --muted: #8b887f;
  --muted-dim: #5c5a54;
  --line: #232226;
  --accent: #d99a4a;
  --accent-dim: #8a6634;
  --max-width: 760px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.logo-dim { color: var(--muted-dim); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.82rem;
  transition: color 0.15s ease;
  position: relative;
}

.nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
}

/* ---------- Intro ---------- */
.intro {
  padding: 100px 0 84px;
  border-bottom: 1px solid var(--line);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0 0 28px;
  text-transform: lowercase;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.intro-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--ink);
}

.intro-role {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--accent);
  margin: 0 0 26px;
  min-height: 1.4em;
}

.cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.intro-copy {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink);
  max-width: 600px;
  margin: 0 0 36px;
}

.intro-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 32px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-meta div {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
}

.intro-meta dt {
  color: var(--muted-dim);
  width: 80px;
  flex-shrink: 0;
}

.intro-meta dd {
  margin: 0;
  color: var(--muted);
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.intro-links a {
  font-size: 0.85rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.intro-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

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

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

.section-label {
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 36px;
  letter-spacing: 0.02em;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .status-dot, .cursor { animation: none; }
}

/* ---------- Ledger rows (experience / research) ---------- */
.ledger-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.ledger-row:first-of-type { border-top: none; padding-top: 0; }

.ledger-date {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  color: var(--muted-dim);
  padding-top: 4px;
}

.ledger-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.ledger-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 0;
  color: var(--ink);
}

.ledger-org {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}

.ledger-place {
  font-size: 0.75rem;
  color: var(--muted-dim);
  white-space: nowrap;
}

.ledger-sub {
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 14px;
}

.ledger-body ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.ledger-body li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.ledger-body li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--muted-dim);
}

/* ---------- Projects ---------- */
.project-entry {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 28px 28px 24px;
}

.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.project-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0;
  color: var(--ink);
}

.project-year {
  font-size: 0.78rem;
  color: var(--muted-dim);
}

.project-entry > p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

.project-entry ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.project-entry li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.project-entry li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--muted-dim);
}

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

.tag {
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 4px 9px;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 40px;
  margin-bottom: 44px;
}

.skill-cat {
  display: block;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.skill-group p,
.leadership p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

.leadership {
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.leadership p { margin-bottom: 18px; }
.leadership p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-section { text-align: left; }

.contact-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 20px;
  color: var(--ink);
}

.contact-email {
  display: inline-block;
  font-size: 1.05rem;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 3px;
  margin-bottom: 28px;
  transition: opacity 0.15s ease;
}

.contact-email:hover { opacity: 0.75; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); }

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 26px 28px;
  font-size: 0.78rem;
  color: var(--muted-dim);
}

.footer-inner a { color: var(--muted-dim); }
.footer-inner a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 28px 24px;
    gap: 16px;
    display: none;
    border-bottom: 1px solid var(--line);
  }

  .nav-links.open { display: flex; }

  .intro { padding: 64px 0 56px; }

  .section { padding: 56px 0; }

  .ledger-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ledger-date {
    flex-direction: row;
    gap: 8px;
    color: var(--muted-dim);
  }

  .ledger-date span:not(:last-child)::after { content: '–'; margin-left: 8px; }

  .skills-grid { grid-template-columns: 1fr; gap: 26px; }
}