@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

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

:root {
  --bg: #0c0c0c;
  --fg: #d4d4d4;
  --fg-dim: #737373;
  --fg-bright: #f5f5f5;
  --accent: #c9a84c;
  --accent-dim: #8a7233;
  --result-color: #8ab4a0;
  --rule: #262626;
  --max-w: 72ch;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  padding: 3rem 1.5rem 6rem;
  max-width: var(--max-w);
  margin: 0 auto;
  font-weight: 400;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color 0.15s;
}
a:hover {
  border-color: var(--accent);
}

/* ── Header ── */
header {
  margin-bottom: 3rem;
}

.header-top {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.headshot {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  filter: grayscale(30%);
}

.header-text {
  flex: 1;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg-bright);
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.tagline {
  color: var(--fg-dim);
  font-size: 0.85rem;
  font-weight: 300;
  margin-bottom: 0;
}

.about {
  font-size: 0.8rem;
  color: var(--fg);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.contact {
  font-size: 0.8rem;
  color: var(--fg-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.contact a {
  color: var(--fg-dim);
  border-bottom-color: var(--rule);
}
.contact a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.cv-link {
  color: var(--accent) !important;
  border-bottom-color: var(--accent-dim) !important;
  font-weight: 500;
}
.cv-link:hover {
  border-bottom-color: var(--accent) !important;
}

/* ── Sections ── */
section {
  margin-bottom: 3rem;
}

h2 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

/* ── Project entries ── */
.project {
  margin-bottom: 2.25rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-bottom: 0.15rem;
}

.project-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg-bright);
}

.project-meta {
  font-size: 0.75rem;
  color: var(--fg-dim);
  font-weight: 300;
  white-space: nowrap;
}

.project-org {
  font-size: 0.8rem;
  color: var(--fg-dim);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 0.6rem;
}

.project-body {
  font-size: 0.8rem;
  color: var(--fg);
  line-height: 1.7;
}

.project-body p {
  margin-bottom: 0.3rem;
}

.label {
  color: var(--fg-dim);
  font-weight: 500;
}

.result {
  color: var(--result-color);
  font-weight: 500;
}

.result a {
  color: var(--accent);
  border-bottom-color: var(--accent-dim);
}
.result a:hover {
  border-bottom-color: var(--accent);
}

/* ── Compact lists ── */
.edu-entry {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.edu-entry .school {
  font-weight: 600;
  color: var(--fg-bright);
}

.edu-entry .degree {
  color: var(--fg);
}

.edu-entry .dates {
  color: var(--fg-dim);
  font-size: 0.75rem;
}

.skills-list {
  font-size: 0.8rem;
  color: var(--fg);
  line-height: 1.8;
}

.skills-list .cat {
  color: var(--fg-dim);
  font-weight: 500;
}

.other-list {
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--fg);
}

.other-item {
  margin-bottom: 0.15rem;
}

.other-item .highlight {
  color: var(--fg-bright);
  font-weight: 500;
}

/* ── Nav ── */
nav {
  margin-bottom: 3rem;
  font-size: 0.8rem;
}

nav a {
  color: var(--fg-dim);
  border-bottom-color: var(--rule);
}
nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Writing index ── */
h1.page-title {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}

.essay-item {
  margin-bottom: 2rem;
}

.essay-item a.essay-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg-bright);
  border-bottom-color: var(--rule);
}
.essay-item a.essay-title:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.essay-item .essay-subtitle {
  font-size: 0.8rem;
  color: var(--fg-dim);
  font-weight: 300;
  font-style: italic;
  margin-top: 0.25rem;
}

.essay-item .essay-date {
  font-size: 0.75rem;
  color: var(--fg-dim);
  font-weight: 300;
  margin-top: 0.2rem;
}

/* ── Essay ── */
.essay-header {
  margin-bottom: 2.5rem;
}

.essay-header h1 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.essay-header .subtitle {
  font-size: 0.85rem;
  color: var(--fg-dim);
  font-weight: 300;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.essay-header .meta {
  font-size: 0.75rem;
  color: var(--fg-dim);
  font-weight: 300;
}

.essay-body h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg-bright);
  text-transform: none;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0;
  border-bottom: none;
}

.essay-body p {
  font-size: 0.8rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* ── Footer ── */
footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.7rem;
  color: var(--fg-dim);
  font-weight: 300;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  html { font-size: 14px; }
  body { padding: 2rem 1.25rem 4rem; }
  .project-header { flex-direction: column; gap: 0; }
}
