/* ── Custom Properties ─────────────────────────────── */
:root {
  --bg: #0f1014;
  --bg-subtle: #16171d;
  --text: #d8d8e0;
  --text-muted: #8a8a9a;
  --accent: #5e9970;
  --accent-light: #6faa80;
  --accent-dim: rgba(74, 124, 89, 0.15);
  --border: #252530;
  --gutter: 30%;
  --content: 70%;
  --mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

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

/* ── Base ─────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ───────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.grid {
  display: grid;
  grid-template-columns: var(--gutter) var(--content);
  gap: 0 3rem;
  align-items: start;
}

/* ── Typography ───────────────────────────────────── */
h1, h2, h3 { font-weight: 600; }

.name {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.name .accent { color: var(--accent-light); }

.tagline {
  font-family: var(--sans);
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
}

/* ── Section Labels (left gutter) ─────────────────── */
.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  padding-top: 0.35rem;
  position: sticky;
  top: 2rem;
}

/* ── Dividers ─────────────────────────────────────── */
.divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 4rem auto;
  max-width: 1100px;
}

/* ── Header ───────────────────────────────────────── */
header {
  padding: 6rem 0 2rem;
}

/* ── About ────────────────────────────────────────── */
.about-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.headshot {
  width: 130px;
  height: 130px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
}

.about-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 50ch;
}

.about-text p + p {
  margin-top: 0.75rem;
}

.interests {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
}

/* ── Experience ───────────────────────────────────── */
.experience-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.experience-item:last-child { border-bottom: none; }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exp-role {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
}

.exp-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.exp-company {
  color: var(--accent-light);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.exp-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.badge-remote {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.exp-tech {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ── Testimonials ─────────────────────────────────── */
.testimonials {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.testimonial {
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
}

.testimonial p {
  color: var(--text);
  font-size: 0.95rem;
  font-style: italic;
}

.testimonial cite {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-style: normal;
  color: var(--text-muted);
}

/* ── Previous Experience ──────────────────────────── */
.previous-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0.5rem 0;
}

.prev-item {
  font-size: 0.95rem;
  white-space: nowrap;
}

.prev-company {
  color: var(--text);
}

.prev-years {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Projects ─────────────────────────────────────── */
.project {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}

.project:hover {
  border-color: var(--accent-dim);
}

.project.featured {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-name {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text);
}

.project-name a:not(.gem-badge) {
  color: inherit;
  text-decoration: none;
}

.project-name a:not(.gem-badge):hover {
  color: var(--accent-light);
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lang-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.lang-ruby { background: #701516; }
.lang-js { background: #f1e05a; }
.lang-html { background: #e34c26; }
.lang-go { background: #00add8; }
.gem-badge,
.gem-badge:visited,
.gem-badge:active {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: #c4513a;
  margin-left: 0.5rem;
  text-decoration: none;
}

.gem-badge:hover {
  color: #e9573f;
}

.gem-badge::before {
  content: "◆ ";
}

.lang-ember { background: #e04e39; }
.lang-rails { background: #cc0000; }

.stars::before {
  content: "★ ";
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.project-links {
  margin-top: 0.5rem;
}

.project-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-light);
  text-decoration: none;
}

.project-links a:hover {
  text-decoration: underline;
}

/* ── Footer ───────────────────────────────────────── */
footer {
  padding: 4rem 0;
  text-align: center;
}

footer a {
  font-family: var(--mono);
  color: var(--accent-light);
  text-decoration: none;
  font-size: 1rem;
}

footer a:hover {
  text-decoration: underline;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .section-label {
    position: static;
    padding-top: 0;
    margin-bottom: 0.25rem;
  }

  header { padding: 3rem 0 1rem; }

  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-text { max-width: none; }

  .exp-header { flex-direction: column; }

  .container { padding: 0 1.25rem; }
}

/* ── Print ────────────────────────────────────────── */
@media print {
  :root {
    --bg: #fff;
    --text: #000;
    --text-muted: #333;
    --accent: #2a5a3a;
    --accent-light: #2a5a3a;
    --border: #ccc;
  }

  body {
    background-image: none;
    font-size: 11pt;
  }

  .headshot { border: 1px solid #ccc; }

  .project { break-inside: avoid; }
}
