/* ryanjhamby.dev: quiet, text-led. System fonts only, one accent, light + dark. */

:root {
  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --gap: 24px;
  --content-gap: 20px;
  --main-width: 720px;
  --header-height: 64px;
  --radius: 4px;

  --theme: #fbfaf7;
  --entry: #fbfaf7;
  --primary: #1b1c1e;
  --secondary: #5d6066;
  --tertiary: #e4e1d9;
  --content: #26272a;
  --code-block-bg: #f1efe9;
  --code-bg: #efece5;
  --border: #e4e1d9;
  --accent: #1d4e89;
}

[data-theme="dark"] {
  --theme: #131517;
  --entry: #131517;
  --primary: #ecebe7;
  --secondary: #9a9da3;
  --tertiary: #2a2d31;
  --content: #d8d7d2;
  --code-block-bg: #1b1d20;
  --code-bg: #212428;
  --border: #2a2d31;
  --accent: #8ab4e0;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  background: var(--theme);
  color: var(--content);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Header / nav */
.header { font-family: var(--sans); }
.header { padding: 0; }
.nav { max-width: var(--main-width); padding: 0 var(--gap); margin: 0 auto; }
.main { max-width: var(--main-width); overflow-wrap: anywhere; }
img, pre, table { max-width: 100%; }
.logo a {
  font-family: var(--sans);
  font-weight: 650;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--primary);
}
#menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--secondary);
}
#menu a:hover, #menu .active { color: var(--primary); }
#menu .active { border-bottom: 1.5px solid var(--accent); }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--primary);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.25;
}
.post-title, .page-header h1 { font-size: 2.1rem; font-weight: 600; }
.post-content h2 { font-size: 1.45rem; margin: 2.4rem 0 0.8rem; }
.post-content h3 { font-size: 1.15rem; margin: 1.8rem 0 0.5rem; }
.post-content p, .post-content li { color: var(--content); }
.post-content a, .post-content a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  box-shadow: none;
}
.post-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.4rem 0;
}
.post-meta, .entry-footer, .breadcrumbs, .post-footer {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--secondary);
}
.post-description { color: var(--secondary); font-style: italic; }

/* Code */
code, pre { font-family: var(--mono); }
.post-content code {
  font-size: 0.86em;
  border-radius: 3px;
  padding: 0.12em 0.35em;
  background: var(--code-bg);
}
.post-content pre, .post-content .highlight pre {
  font-size: 13.5px;
  line-height: 1.55;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--code-block-bg) !important;
}
.post-content pre code { background: transparent; padding: 0; }
.post-content pre code, .post-content pre span { color: var(--content) !important; }

/* Tables */
.post-content table { font-family: var(--sans); font-size: 14.5px; border-collapse: collapse; width: 100%; }
.post-content th, .post-content td { border: 0; border-bottom: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.post-content th { color: var(--secondary); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.post-content table tbody tr:hover { background: transparent; }

/* Blockquote */
.post-content blockquote {
  margin: 1.4rem 0;
  padding: 0 0 0 1.1rem;
  border-left: 2px solid var(--accent);
  color: var(--secondary);
}

/* Lists on index pages */
.post-entry {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 1.1rem 0;
  margin: 0;
}
.post-entry:active { transform: none; }
.entry-header h2 { font-size: 1.25rem; margin: 0; }
.entry-content { font-size: 16px; color: var(--secondary); margin: 6px 0; }

/* Content blocks that replace the old badges / boxes */
.achievement {
  margin: 0.9rem 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--border);
  background: none;
  box-shadow: none;
  border-radius: 0;
  color: var(--content);
}
.metric {
  font-family: var(--mono);
  font-size: 0.88em;
  font-weight: 500;
  color: var(--primary);
  background: none;
  padding: 0;
}
.project-showcase { margin: 1rem 0; }

/* Home: selected work */
.post-content ul.work-list, .post-content ul.post-index { list-style: none; padding: 0; margin: 1.2rem 0; }
.post-index li { display: flex; gap: 1.2rem; padding: 0.55rem 0; margin: 0; border-bottom: 1px solid var(--border); }
.post-index .meta { font-family: var(--mono); font-size: 12px; color: var(--secondary); min-width: 4.8rem; padding-top: 0.35rem; }
.post-index a { color: var(--primary); text-decoration: none; }
.post-index a:hover { color: var(--accent); }
.work-list li {
  padding: 1rem 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.work-list li:first-child { border-top: 1px solid var(--border); }
.work-list strong a { font-size: 1.08rem; }
.work-list .meta {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--secondary);
  margin-bottom: 4px;
}

.links-line { font-family: var(--sans); font-size: 15px; }
.links-line a { margin-right: 1.1rem; }

/* Footer */
.footer {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--secondary);
  padding: 2.2rem var(--gap);
  border-top: 1px solid var(--border);
  max-width: var(--main-width);
  margin: 3rem auto 0;
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.footer a { color: var(--secondary); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* Phones */
@media (max-width: 600px) {
  body { font-size: 17px; }
  .post-title, .page-header h1 { font-size: 1.7rem; }
  .nav { padding: 0 16px; }
  .main { padding: 0 16px; }
}

.list, [data-theme="dark"] .list { background: var(--theme); }

.project-index .meta { min-width: 9.5rem; }
.project-index .tags { font-family: var(--mono); font-size: 12px; color: var(--secondary); }
.page-header { margin: 1.5rem 0; }
@media (max-width: 600px) { .project-index li { flex-direction: column; gap: 2px; } }
