/* Matthew Flores — personal site
   System: 680px column, off-white bg, near-black text, single accent. */

:root {
  --bg: #FAF8F5;
  --bg-soft: #F4F1EB;
  --ink: #1A1A1A;
  --ink-2: #3A3A3A;
  --ink-3: #6B6B6B;
  --rule: #E5E0D8;
  --accent: oklch(0.42 0.05 155);
  --display-font: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --section-gap: 120px;
  --col: 680px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

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

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

/* ── Page shell ─────────────────────────────────────────────────────────── */
.page {
  max-width: var(--col);
  margin: 0 auto;
  padding: 96px 32px 80px;
}

@media (max-width: 600px) {
  .page { padding: 64px 24px 64px; }
  :root { --section-gap: 80px; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  margin-bottom: var(--section-gap);
}

.hero-text {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
  max-width: 56ch;
  text-wrap: pretty;
  letter-spacing: -0.005em;
}

/* ── Sections ───────────────────────────────────────────────────────────── */
.section {
  margin-bottom: var(--section-gap);
}

.section-lead {
  margin-bottom: var(--section-gap);
}

.section-label {
  font-family: var(--display-font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 40px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

/* ── Projects ───────────────────────────────────────────────────────────── */
.projects {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.project {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.project-name {
  font-family: var(--display-font);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.005em;
}

.project-year {
  font-family: var(--display-font);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.project-desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 60ch;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-family: var(--display-font);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
  margin-top: 2px;
}

.project-stack {
  color: var(--ink-3);
}

.project-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.project-links .sep {
  color: var(--rule);
}

/* ── Status tags ────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display-font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid currentColor;
  line-height: 1;
}

.tag::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.tag-live { color: var(--accent); }
.tag-prototype { color: var(--ink-2); }
.tag-archived { color: var(--ink-3); opacity: 0.7; }

/* ── Links ──────────────────────────────────────────────────────────────── */
.link {
  color: var(--ink);
  position: relative;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color 120ms ease, color 120ms ease;
}

.link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.link .arrow {
  display: inline-block;
  font-size: 0.9em;
  transition: transform 160ms ease;
  margin-left: 1px;
}

.link:hover .arrow {
  transform: translate(1px, -1px);
}

/* ── Essays ─────────────────────────────────────────────────────────────── */
.essays {
  display: flex;
  flex-direction: column;
}

.essay {
  display: block;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  transition: padding-left 180ms ease;
}

.essay:first-child { padding-top: 0; }
.essay:last-child { border-bottom: none; }

.essay:hover {
  padding-left: 8px;
}

.essay-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.essay-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.005em;
  transition: color 120ms ease;
}

.essay:hover .essay-title {
  color: var(--accent);
}

.essay-date {
  font-family: var(--display-font);
  font-size: 12px;
  color: var(--ink-3);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.essay-blurb {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-3);
  line-height: 1.55;
}

/* ── About ──────────────────────────────────────────────────────────────── */
.about-intro {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 20px;
}

.headshot {
  width: 96px;
  height: 96px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
  filter: grayscale(0.15) contrast(1.02);
  border: 1px solid var(--rule);
}

.about-intro p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

.about > p {
  margin: 0 0 20px 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

@media (max-width: 480px) {
  .about-intro {
    grid-template-columns: 72px 1fr;
    gap: 18px;
  }
  .headshot {
    width: 72px;
    height: 72px;
  }
}

.links {
  list-style: none;
  margin: 32px 0 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: var(--display-font);
  font-size: 13px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  margin-top: var(--section-gap);
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-family: var(--display-font);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.footer p { margin: 0; }
.footer-sub { color: var(--ink-3); }

@media (max-width: 480px) {
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .project-head {
    flex-direction: column;
    gap: 4px;
  }
  .project-meta {
    font-size: 11px;
    gap: 10px;
  }
  .project-links {
    margin-left: 0;
    width: 100%;
  }
  .essay-line {
    flex-direction: column;
    gap: 4px;
  }
}
