/* ============================================
   jordandocherty.me — shared stylesheet
   Aesthetic: editorial-engineer.
   Serif display + monospace accents + clean body.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=JetBrains+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg:        #f5f1e8;
  --bg-soft:   #ece6d8;
  --fg:        #14110d;
  --fg-soft:   #3a342a;
  --fg-muted:  #7a7368;
  --accent:    #a8662e;
  --accent-soft: #8a4f1f;
  --line:      #d6cfbe;
  --maxw:      820px;
  --gap:       2rem;

  --serif: 'Fraunces', Georgia, serif;
  --mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container ---------------------------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
  padding: 4rem 0 6rem;
}

/* Header ---------------------------- */

header.site-header {
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 1px;
}

nav.site-nav {
  display: flex;
  gap: 1.5rem;
}

nav.site-nav a {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--fg-soft);
  text-decoration: none;
  padding: 0.25rem 0;
  position: relative;
  transition: color 0.15s ease;
}

nav.site-nav a:hover { color: var(--fg); }

nav.site-nav a.active {
  color: var(--fg);
}

nav.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
}

/* Footer ---------------------------- */

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: var(--fg-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer a:hover { color: var(--accent); }

/* Typography ---------------------------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

h2 {
  font-size: clamp(1.4rem, 2vw, 1.65rem);
  margin-top: 3rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--fg-soft);
  max-width: 60ch;
}

p.lead {
  font-size: 1.25rem;
  color: var(--fg);
  line-height: 1.5;
  max-width: 38ch;
  font-weight: 400;
}

a.inline {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

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

/* Section labels ---------------------------- */

.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: inline-block;
}

/* Project / writing entries ---------------------------- */

.entry {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 2rem;
  align-items: baseline;
}

.entry:last-child {
  border-bottom: 1px solid var(--line);
}

.entry-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 0.4rem;
}

.entry h3 {
  margin-bottom: 0.5rem;
}

.entry h3 a {
  color: var(--fg);
  text-decoration: none;
  transition: color 0.15s ease;
}

.entry h3 a:hover {
  color: var(--accent);
}

.entry p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.entry .links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.entry .links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

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

.entry .links a::before {
  content: "→ ";
  color: var(--accent-soft);
}

/* CTA ---------------------------- */

.cta-section {
  margin-top: 5rem;
  padding: 3rem 2rem;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 4px;
}

.cta-section h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.75rem;
}

.cta-section p {
  margin-bottom: 1.5rem;
}

.cta-section .cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.cta-button.primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}

.cta-button.primary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}

.cta-button.secondary {
  color: var(--fg);
  border: 1px solid var(--line);
}

.cta-button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Reveal animations (disabled — kept as no-op so existing markup is harmless) */

.reveal {
  opacity: 1;
}

/* Lists in prose ---------------------------- */

ul.prose, ol.prose {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
  color: var(--fg-soft);
}

ul.prose li, ol.prose li {
  margin-bottom: 0.5rem;
  max-width: 60ch;
}

/* External link indicator ---------------------------- */

a[target="_blank"]::after {
  content: "\2197";
  font-size: 0.78em;
  display: inline-block;
  vertical-align: 0.1em;
  color: var(--accent-soft);
  margin-left: 0.1em;
  text-decoration: none;
  border-bottom: 0;
}

/* Inline code ---------------------------- */

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-soft);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--fg);
}

/* Empty state for writing page ---------------------------- */

.empty-state {
  padding: 4rem 0;
  text-align: center;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  margin: 2rem 0;
}

.empty-state p {
  color: var(--fg-muted);
  font-family: var(--mono);
  font-size: 0.875rem;
  margin: 0 auto;
  max-width: 40ch;
}

/* Intro (home) ---------------------------- */

.intro {
  padding: 1rem 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
}

.intro-text {
  min-width: 0;
}

.intro-text > :first-child {
  margin-top: 0;
}

.avatar {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 0;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  flex-shrink: 0;
}

.avatar svg, .avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tagline {
  font-size: 1.05rem;
  color: var(--fg);
  line-height: 1.55;
  max-width: 56ch;
  margin-bottom: 1rem;
}

.email {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--fg);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  user-select: all;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.contact-row a {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--fg-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-row a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.status {
  font-size: 0.8125rem;
  color: var(--fg-muted);
  font-style: italic;
  opacity: 0.85;
  margin-bottom: 0;
}

/* Section divider + heading ---------------------------- */

main hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 3rem 0 0;
}

h2.section-h {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--fg);
  text-transform: none;
  margin-top: 2rem;
  margin-bottom: 1.25rem;
}

/* "Currently" list (home) ---------------------------- */

.now-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.now-list li {
  font-size: 0.95rem;
  color: var(--fg-soft);
  line-height: 1.55;
  max-width: 62ch;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.85rem;
  align-items: baseline;
}

.now-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* Selected work list (home) ---------------------------- */

.work-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.work-list li {
  font-size: 0.95rem;
  color: var(--fg-soft);
  line-height: 1.55;
  max-width: 64ch;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.85rem;
  align-items: baseline;
}

.work-list .work-date {
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-muted);
}

.work-list a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.work-list a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.work-list a.muted {
  color: var(--fg-muted);
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
  font-family: var(--mono);
  margin-left: 0.25rem;
}

.work-list a.muted:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Skills (about) ---------------------------- */

.skills {
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}

.skills > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.skills dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

.skills dd {
  font-size: 0.95rem;
  color: var(--fg-soft);
  margin: 0;
}

/* Page tabs (humans / agents) ---------------------------- */

.page-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.page-tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--fg-muted);
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.page-tab:first-child {
  padding-left: 0;
}

.page-tab:hover {
  color: var(--accent);
}

.page-tab.active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

.page-pane {
  display: none;
}

.page-pane.active {
  display: block;
}

.md-source {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--fg);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  border-radius: 2px;
}

/* Vertical timeline (home experience) ---------------------------- */

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: calc(6.5rem + 0.75rem - 0.5px);
  top: 1.5rem;
  bottom: 1.5rem;
  width: 1px;
  background: var(--line);
}

.timeline .role {
  position: relative;
  display: grid;
  grid-template-columns: 6.5rem 1.5rem 1fr;
  gap: 0;
  border: 0;
  padding: 1.25rem 0;
  align-items: start;
}

.timeline .role:first-of-type {
  padding-top: 0.5rem;
}

.timeline .role:last-of-type {
  padding-bottom: 0.5rem;
}

.timeline .role-meta-col {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  padding-right: 1rem;
  padding-top: 0.4rem;
}

.timeline .role-dates {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--fg-muted);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  text-align: right;
}

.timeline .role-body {
  grid-column: 3;
  padding-left: 0.5rem;
}

.timeline .role::before {
  content: "";
  position: absolute;
  top: 1.65rem;
  left: calc(6.5rem + 0.75rem - 4.5px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}

.timeline .role:first-of-type::before {
  top: 0.85rem;
}

.timeline-event {
  position: relative;
  text-align: center;
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--fg-muted);
  padding: 0.9rem 0;
  margin: 0.25rem 0;
}

.timeline-event::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(6.5rem + 0.75rem - 4px);
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent-soft);
  box-shadow: 0 0 0 3px var(--bg);
}

/* Experience timeline (about) ---------------------------- */

.role {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.role:last-of-type {
  border-bottom: 1px solid var(--line);
}

.role-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.35rem;
}

.role-dates {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.role-where {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

.role-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
  color: var(--fg);
}

.role-highlights {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: -0.1rem 0 0.9rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-soft);
  width: fit-content;
}

.highlight-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  color: var(--fg-muted);
  font-style: italic;
  letter-spacing: 0.02em;
}

.highlight-logo {
  height: 16px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.highlight-mit {
  height: 13px;
}

.highlight-esa {
  height: 26px;
}

.highlight-text {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--fg-soft);
}

.role-logo {
  display: block;
  height: 38px;
  width: auto;
}

.role-summary {
  font-size: 0.95rem;
  color: var(--fg);
  line-height: 1.55;
  margin-bottom: 0.65rem;
  max-width: 62ch;
}

.role-body .links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.role-body .links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

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

.role-body .links a::before {
  content: "→ ";
  color: var(--accent-soft);
}

.role-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.role-bullets li {
  font-size: 0.95rem;
  color: var(--fg-soft);
  line-height: 1.55;
  position: relative;
  padding-left: 1.1rem;
  max-width: 62ch;
}

.role-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 1px;
}

/* Mobile ---------------------------- */

@media (max-width: 600px) {
  body { font-size: 16px; }

  main { padding: 2.5rem 0 4rem; }

  nav.site-nav { gap: 1rem; }

  nav.site-nav a { font-size: 0.75rem; }

  .entry {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.5rem 0;
  }

  .entry-meta { padding-top: 0; }

  .cta-section {
    padding: 2rem 1.25rem;
  }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .now-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .skills > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.75rem 0;
  }

  .role {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1.25rem 0;
  }

  .role-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .avatar {
    width: 112px;
    height: 112px;
  }

  .timeline::before,
  .timeline .role::before,
  .timeline-event::before {
    display: none;
  }

  .timeline-event {
    text-align: left;
    padding: 0.75rem 0;
    font-size: 0.75rem;
  }

  .timeline .role {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    padding: 1rem 0;
  }

  .timeline .role-meta-col {
    grid-column: 1;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0;
  }

  .timeline .role-logo {
    display: none;
  }

  .timeline .role-dates {
    text-align: left;
  }

  .timeline .role-body {
    grid-column: 1;
    padding-left: 0;
  }
}
