/* Emrys Schoemaker — personal site
   Design tokens carried over from the approved mockup (Claude Design canvas). */

:root {
  --bg: oklch(0.97 0.008 240);
  --bg-card: oklch(0.99 0.004 240);
  --bg-feature: oklch(0.945 0.012 235);
  --fg: oklch(0.24 0.012 240);
  --fg-muted: oklch(0.48 0.014 240);
  --fg-faint: oklch(0.62 0.012 240);
  --border: oklch(0.88 0.01 240);
  --border-feature: oklch(0.78 0.03 230);
  --accent: oklch(0.60 0.09 230);
  --photo-bg: oklch(0.90 0.015 240);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

img {
  max-width: 100%;
}

.wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
}

/* ---------- Layout shell ---------- */

.page {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 44px 24px 32px;
  border-bottom: 1px solid var(--border);
}

.site-header .wordmark {
  font-size: 24px;
  text-align: center;
}

.site-header .wordmark a {
  color: var(--fg);
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(16px, 4vw, 36px);
}

.site-nav a {
  font-size: 14px;
  color: var(--fg-muted);
}

.site-nav a[aria-current="page"] {
  color: var(--fg);
  font-weight: 600;
}

main {
  flex: 1;
}

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

.site-footer {
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--fg-faint);
}

/* ---------- Home ---------- */

.portrait {
  margin: 40px auto 0;
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  background: var(--photo-bg);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bio {
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.bio p {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
}

.bio-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.focus-areas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tag {
  font-size: 13px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--fg-muted);
  background: var(--bg-card);
}

/* ---------- Research & Writing ---------- */

.section-pad {
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.track-label {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.track-label .orcid-link {
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.tracks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.entry-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.entry-meta {
  font-size: 12px;
  color: var(--fg-faint);
  margin-bottom: 8px;
}

.entry-desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.65;
  margin-bottom: 8px;
}

.entry-link {
  font-size: 13px;
}

.citation {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 8px;
}

/* ---------- Projects ---------- */

.engagement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.engagement-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 6px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.engagement-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.engagement-card p {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 0;
}

.building-panel {
  background: var(--bg-feature);
  border: 1px solid var(--border-feature);
  border-radius: 6px;
  padding: 36px clamp(20px, 5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.building-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.building-header .copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
}

.building-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.building-header p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.65;
  margin: 0;
}

.repo-link {
  font-size: 13px;
  border: 1px solid var(--border-feature);
  border-radius: 4px;
  padding: 8px 14px;
  white-space: nowrap;
  background: var(--bg-card);
}

.pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--border-feature);
}

.pipeline-step {
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 16px;
  color: var(--fg-muted);
  background: var(--bg-card);
  line-height: 1.5;
}

.pipeline-step.current {
  border-color: var(--accent);
  color: var(--fg);
}

.pipeline-step .label {
  display: block;
}

.pipeline-step .sub {
  color: var(--fg-faint);
  font-size: 11px;
}

.pipeline-arrow {
  color: var(--fg-faint);
}

/* ---------- Contact ---------- */

.contact-wrap {
  flex: 1;
  padding: 64px 24px;
  display: flex;
  justify-content: center;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 560px;
  padding-top: 40px;
}

.contact-card h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
}

.contact-card > p {
  margin: 0;
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
}

.contact-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.6;
}

.contact-email {
  font-size: 19px;
  font-weight: 600;
  margin-top: 12px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 4px;
}

.social-links a {
  display: flex;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.social-links a:hover {
  opacity: 1;
}

.social-links img {
  width: 22px;
  height: 22px;
  display: block;
}

/* ---------- Responsive ---------- */

@media (max-width: 800px) {
  .tracks {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .engagement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .engagement-grid {
    grid-template-columns: 1fr;
  }

  .pipeline {
    flex-direction: column;
    align-items: stretch;
  }

  .pipeline-arrow {
    transform: rotate(90deg);
    align-self: center;
  }

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

  .repo-link {
    white-space: normal;
  }
}
