/* joshuadelucia.com — one stylesheet, no JavaScript required. */

@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/playfair-display-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/fonts/playfair-display-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --paper: #f6f3ec;
  --paper-2: #efeadf;
  --ink: #1d1c1a;
  --ink-2: #3b3833;
  --muted: #5d584f;
  --rule: #d8d1c3;
  --accent: #9a3412;
  --accent-ink: #7c2a0e;
  --focus: #1f4fd1;
  --display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --text: "Sitka Text", Charter, "Bitstream Charter", "Iowan Old Style", Cambria, Georgia, serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 38rem;
  --wide: 68rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161513;
    --paper-2: #1f1d1a;
    --ink: #ece8e0;
    --ink-2: #d6d1c7;
    --muted: #aaa397;
    --rule: #3a3631;
    --accent: #e8956b;
    --accent-ink: #f0ab86;
    --focus: #8fb0ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem;
  font-family: var(--ui); font-size: 0.95rem;
}
.skip:focus { top: 1rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.75rem 2rem; padding-top: 1.25rem; padding-bottom: 1.1rem; }
.brand { font-family: var(--display); font-size: 1.5rem; font-weight: 500; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--accent-ink); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-nav a { font-family: var(--ui); font-size: 0.95rem; color: var(--ink-2); text-decoration: none; padding: 0.35rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.15; letter-spacing: -0.012em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); margin: 0 0 1.5rem; max-width: 22ch; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 1.25rem; }
h3 { font-size: 1.35rem; margin: 0 0 0.5rem; }
h1 em, h2 em { font-style: italic; color: var(--accent-ink); }
p { margin: 0 0 1.1rem; }
.kicker, .label, .meta { font-family: var(--ui); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.kicker { margin: 0 0 1.25rem; }
.lede { font-size: 1.25rem; line-height: 1.6; color: var(--ink-2); max-width: var(--measure); }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 3rem; }
.prose > h2:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.after-list { margin-top: 2rem; }
.page-end { padding-bottom: 4.5rem; }

main { display: block; }
.hero { padding: 4rem 0 3rem; }
@media (min-width: 48rem) { .hero { padding: 6rem 0 4rem; } }
header.hero { padding-bottom: 1.5rem; }
.section { padding: 3.25rem 0; border-top: 1px solid var(--rule); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 2rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.more { font-family: var(--ui); font-size: 0.95rem; }

/* Two-column section layout on wide screens */
@media (min-width: 60rem) {
  .split { display: grid; grid-template-columns: 17rem 1fr; gap: 3rem; }
  .split > .section-head { display: block; }
  .split > .section-head .more { display: inline-block; margin-top: 0.75rem; }
}

/* Numbered problem list */
.problems { list-style: none; margin: 0; padding: 0; counter-reset: p; display: grid; gap: 2rem; }
@media (min-width: 48rem) { .problems { grid-template-columns: repeat(3, 1fr); } }
.problems li { counter-increment: p; }
.problems li::before { content: "0" counter(p); display: block; font-family: var(--ui); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--accent-ink); margin-bottom: 0.6rem; }
.problems p { font-size: 1.05rem; color: var(--ink-2); margin: 0; }

/* Index lists (projects, writing) */
.index { list-style: none; margin: 0; padding: 0; }
.index > li { padding: 1.35rem 0; border-top: 1px solid var(--rule); }
.index > li:last-child { border-bottom: 1px solid var(--rule); }
.index h3, .index .h3 { font-family: var(--display); font-weight: 500; line-height: 1.2; font-size: 1.3rem; margin: 0 0 0.35rem; }
.index h3 a, .index .h3 a { color: var(--ink); text-decoration: none; }
.index h3 a:hover, .index .h3 a:hover { color: var(--accent-ink); text-decoration: underline; }
.index p { margin: 0; color: var(--ink-2); font-size: 1.05rem; max-width: var(--measure); }
.index .meta { display: block; margin-bottom: 0.4rem; }
@media (min-width: 48rem) {
  .index.dated > li { display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; }
  .index.dated .meta { margin: 0.35rem 0 0; }
}

.status { display: inline-block; font-family: var(--ui); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: 0.1rem 0.6rem; vertical-align: 0.2em; margin-left: 0.4rem; white-space: nowrap; }

/* Project detail */
.project { padding: 3rem 0; border-top: 1px solid var(--rule); }
.project header { margin-bottom: 1.5rem; }
.project h2 { margin: 0 0 0.6rem; }
.project .label { margin: 0; }
.facts { margin: 0; display: grid; gap: 1.1rem; max-width: 46rem; }
.facts div { display: grid; gap: 0.15rem; }
@media (min-width: 48rem) { .facts div { grid-template-columns: 10rem 1fr; gap: 1.5rem; } }
.facts dt { font-family: var(--ui); font-size: 0.85rem; font-weight: 600; color: var(--muted); padding-top: 0.2rem; }
.facts dd { margin: 0; color: var(--ink-2); }

/* Principles */
.principles { margin: 0; }
.principles dt { font-family: var(--display); font-size: 1.25rem; color: var(--ink); margin-top: 1.6rem; }
.principles dd { margin: 0.3rem 0 0; color: var(--ink-2); }

/* Contact */
.contact { background: var(--paper-2); border-top: 1px solid var(--rule); padding: 3.5rem 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.button { display: inline-block; font-family: var(--ui); font-size: 0.98rem; font-weight: 600; text-decoration: none; padding: 0.75rem 1.2rem; border: 1px solid var(--ink); color: var(--ink); border-radius: 2px; }
.button.primary { background: var(--ink); color: var(--paper); }
.button:hover { border-color: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--paper); }
@media (prefers-color-scheme: dark) { .button.primary:hover { color: #161513; } }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 2.5rem 0 3rem; font-family: var(--ui); font-size: 0.92rem; color: var(--muted); }
.site-foot .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .site-foot .wrap { grid-template-columns: 1.4fr 1fr; } }
.site-foot p { margin: 0 0 0.4rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.site-foot a { color: var(--ink-2); }
.site-foot strong { color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-nav, .skip, .actions { display: none; }
  body { background: #fff; color: #000; }
}
