/* ============================================================
   Roger's Portfolio — shared styles
   Design tokens (edit these to re-theme the whole site)
============================================================ */
:root {
  --radius: 0.5rem;
  --bg: #f6f7f9;
  --fg: #1e2530;
  --muted: #8b7280;
  --border: #dfe3ea;
  --card: #ffffff;
  --secondary: #eef0f4;
  --primary: #aa3446;           /* title bar background */
  --primary-fg: #f6f7f9;
  --accent: #c97a3a;            /* warm accent */
  --accent-fg: #ffffff;
  --prose-link: #2aa9a1;        /* turquoise */
  --shadow-sm: 0 1px 2px rgba(20,24,32,.06);
  --shadow-md: 0 6px 20px rgba(20,24,32,.08);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

/* ---------------- Title bar ---------------- */
.titlebar {
  max-width: 64rem;
  margin: 1.5rem 1.5rem 0;
  border: 1px solid var(--border);
  background: var(--primary);
  color: var(--primary-fg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 640px) {
  .titlebar { margin: 2rem auto 0; }
}
.titlebar-inner {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.5rem;
}
@media (min-width: 640px) {
  .titlebar-inner { flex-direction: row; align-items: baseline; justify-content: space-between; }
}
.titlebar-name h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
@media (min-width: 640px) { .titlebar-name h1 { font-size: 1.875rem; } }
.titlebar-role {
  margin: .125rem 0 0;
  font-size: .875rem;
  color: rgba(246,247,249,.7);
}
.titlebar-email {
  font-size: .875rem;
  color: rgba(246,247,249,.8);
  text-underline-offset: 4px;
}
.titlebar-email:hover { color: var(--accent); text-decoration: underline; }

/* ---------------- Layout ---------------- */
.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
@media (min-width: 640px) { .container { padding: 4rem 1.5rem; } }
.container-narrow { max-width: 56rem; }

.section { margin-bottom: 3rem; }
.section-lg { margin-bottom: 3.5rem; }

.section-heading {
  margin: 0 0 1rem;
  font-size: .935rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* ---------------- Chips (links / skills) ---------------- */
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: .375rem .75rem;
  font-size: .875rem;
  font-weight: 500;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  transition: color .15s, border-color .15s;
}
.chip:hover { color: var(--accent); border-color: var(--accent); }
.footnotes {
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
}

/* ---------------- Prose ---------------- */
.prose p {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(30,37,48,.92);

}
.prose p:last-child { margin-bottom: 0; }
.prose a {
  color: var(--prose-link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.prose a:hover { color: color-mix(in oklab, var(--prose-link) 80%, black); }

.about-section .prose {
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.centered-image {
  text-align: center;
  margin: 0 auto;
}

.centered-image img {
  display: block;
  margin: 0 auto;
}

.code {
  display: block;
  padding: .75rem 1rem;
  margin: 1rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  background: #eef1f4;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
}

/* ---------------- Spec table ---------------- */
.spec-table {
  width: 100%;
  margin: 1rem 0 1.5rem;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.spec-table th,
.spec-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table th {
  background: var(--secondary);
  font-weight: 600;
}
.spec-table th[colspan] { text-align: center; }
.spec-table td:first-child { font-weight: 600; white-space: nowrap; }

/* ---------------- Product list ---------------- */
.product-list {
  list-style: none; margin: 0; padding: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.product-list li + li { border-top: 1px solid var(--border); }
.product-row {
  display: flex; flex-direction: column; gap: .25rem;
  padding: 1rem 1.25rem;
  transition: background .15s;
}
@media (min-width: 640px) {
  .product-row { flex-direction: row; align-items: baseline; justify-content: space-between; }
}
.product-row:hover { background: var(--secondary); }
.product-name { font-weight: 600; font-size: 1rem; }
.product-row:hover .product-name,
.product-row:hover .product-arrow { color: var(--accent); }
.product-role { margin-left: .5rem; font-size: .875rem; color: var(--muted); }
.product-summary { margin: .25rem 0 0; font-size: .875rem; color: var(--muted); }
.product-arrow { font-size: .875rem; color: var(--muted); transition: transform .15s, color .15s; }
.product-row:hover .product-arrow { transform: translateX(2px); }

/* ---------------- Personal projects grid ---------------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.tile {
  display: flex; flex-direction: column; justify-content: flex-start;
  gap: .75rem;
  aspect-ratio: 1 / 1;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.tile-bar {
  width: 2rem; height: 4px; border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 70%, transparent);
  transition: width .15s;
}
.tile:hover .tile-bar { width: 3.5rem; }
.tile h3 {
  margin: 0;
  font-size: .875rem; font-weight: 600;
}
.tile:hover h3 { color: var(--accent); }
.tile p {
  margin: .25rem 0 0;
  font-size: .75rem; color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------- Project page ---------------- */
.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: .875rem;
  color: var(--muted);
  text-underline-offset: 4px;
}
.back-link:hover { color: var(--accent); text-decoration: underline; }

.project-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.project-header h1 {
  margin: 0;
  font-size: 1.875rem; font-weight: 600; letter-spacing: -0.01em;
}
@media (min-width: 640px) { .project-header h1 { font-size: 2.25rem; } }
.project-role { margin: .5rem 0 0; color: var(--muted); }
.project-lede {
  margin: 1rem 0 0; max-width: 42rem;
  font-size: 1rem; line-height: 1.7; color: rgba(30,37,48,.92);
}

/* ---------------- Footer ---------------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
}

/* ---------------- Micro articles ---------------- */
.micro-articles-intro {
  margin: 0 0 1rem;
  max-width: 44rem;
  font-size: .9375rem;
  color: var(--muted);
}
.micro-articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .micro-articles-grid { grid-template-columns: repeat(2, 1fr); }
}
.micro-article {
  padding: 1rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.micro-article:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.micro-article-kicker {
  margin: 0 0 .5rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--accent);
}
.micro-article h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}
.micro-article p {
  margin: .5rem 0 0;
  font-size: .875rem;
  color: var(--muted);
}
