/* Jared Linden — site styles
   Palette: field paper, spruce ink, lichen, goldenrod (focus + placeholders only) */

:root {
  --paper: #f6f7f3;
  --paper-2: #e9eee3;
  --ink: #18241f;
  --ink-soft: #4f5d57;
  --spruce: #2e5a4c;
  --spruce-deep: #21443a;
  --lichen: #dce3d3;
  --line: #cbd4c6;
  --gold: #d9a21b;
  --contour: #2e5a4c;

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: var(--sans);

  --measure: 38rem;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141c19;
    --paper-2: #1b2622;
    --ink: #e7ece4;
    --ink-soft: #a9b5ae;
    --spruce: #8cc2ad;
    --spruce-deep: #a9d6c4;
    --lichen: #22302b;
    --line: #2f3e38;
    --contour: #8cc2ad;
  }
}
:root[data-theme="dark"] {
  --paper: #141c19;
  --paper-2: #1b2622;
  --ink: #e7ece4;
  --ink-soft: #a9b5ae;
  --spruce: #8cc2ad;
  --spruce-deep: #a9d6c4;
  --lichen: #22302b;
  --line: #2f3e38;
  --contour: #8cc2ad;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--spruce); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--spruce-deep); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header { padding: 1.25rem 0; }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.125rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--spruce); text-decoration: none; }
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.975rem; }
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--sans); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 650; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 650; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: var(--measure); }
.muted { color: var(--ink-soft); }
.small { font-size: .925rem; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn { display: inline-block; padding: .7rem 1.15rem; border-radius: 6px; font-weight: 600; text-decoration: none; border: 1.5px solid var(--spruce); }
.btn-primary { background: var(--spruce); color: var(--paper); }
.btn-primary:hover { background: var(--spruce-deep); border-color: var(--spruce-deep); color: var(--paper); text-decoration: none; }
.btn-quiet { color: var(--spruce); background: transparent; }
.btn-quiet:hover { background: var(--lichen); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem); }
.contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--contour); opacity: .22; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: end; }
.hero h1 { max-width: 26ch; font-size: clamp(2rem, 3.9vw, 3.1rem); }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; max-width: 360px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; margin-left: auto; background: var(--lichen); }
.hero-meta { margin-top: 1.25rem; font-size: .95rem; color: var(--ink-soft); }

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .hero-photo img { max-width: 180px; margin-left: 0; aspect-ratio: 1; object-position: 50% 25%; border-radius: 50%; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-head { max-width: var(--measure); margin-bottom: 2.25rem; }
.band { background: var(--paper-2); }

.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.75rem); }
.role { border-top: 3px solid var(--spruce); padding-top: 1.1rem; }
.role p { color: var(--ink-soft); }
.role .more { font-weight: 600; }
@media (max-width: 860px) { .roles { grid-template-columns: 1fr; } }

/* Work list */
.work-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.work-item { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.work-item .org { color: var(--ink-soft); font-size: .95rem; padding-top: .2rem; }
.work-item h3 { margin-bottom: .35em; }
.work-item h3 a { color: var(--ink); text-decoration: none; }
.work-item h3 a:hover { color: var(--spruce); text-decoration: underline; }
.work-item p { margin: 0; color: var(--ink-soft); max-width: var(--measure); }
.work-item .shows { margin-top: .6rem; font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 640px) { .work-item { grid-template-columns: 1fr; gap: .35rem; } }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.75rem); }
.project h3 { margin-bottom: .4em; }
.project p { color: var(--ink-soft); margin-bottom: .5em; }
@media (max-width: 860px) { .projects { grid-template-columns: 1fr; } }

/* Consulting */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: .75rem 0 .75rem 1.6rem; border-bottom: 1px solid var(--line); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 1.25rem; width: .7rem; height: 2px; background: var(--spruce); }

/* Observe / Fix / Make it stick — a real sequence, so it's numbered */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: .75rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.steps li:first-child { border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); grid-row: span 2; font-weight: 700; font-size: 1.6rem; line-height: 1; color: var(--spruce); }
.steps h3 { margin: 0 0 .3em; }
.steps p { margin: 0; color: var(--ink-soft); grid-column: 2; }

/* Contact band */
/* Contact band: same fixed spruce + paper as the home hero, so it reads in light and dark mode */
.contact { background: var(--hero-bg); color: var(--hero-ink); }
.contact h2, .contact p { color: var(--hero-ink); }
.contact .lede { color: var(--hero-soft); }
.contact .btn-primary { background: var(--hero-ink); color: var(--hero-bg); border-color: var(--hero-ink); }
.contact .btn-primary:hover { background: #dce3d3; border-color: #dce3d3; color: var(--hero-bg); }
.contact .btn-quiet { color: var(--hero-ink); border-color: var(--hero-ink); }
.contact .btn-quiet:hover { background: rgba(255,255,255,.12); color: var(--hero-ink); }
.contact a:focus-visible { outline-color: var(--gold); }

/* ---------- Long-form (stories, about) ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem; }
.page-head .kicker { color: var(--ink-soft); margin-bottom: .75rem; }
.page-head h1 { max-width: 24ch; }

.article { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(0, 16rem); gap: clamp(2rem, 6vw, 5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
@media (max-width: 900px) { .article { grid-template-columns: 1fr; } .article aside { order: -1; } }

.prose { font-family: var(--sans); font-size: 1.0625rem; line-height: 1.7; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 1.15em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

.facts { font-size: .95rem; position: sticky; top: 1.5rem; }
.facts dl { margin: 0; }
.facts dt { color: var(--ink-soft); font-size: .85rem; margin-top: 1rem; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: .15rem 0 0; font-weight: 500; }
.facts { border-top: 3px solid var(--spruce); padding-top: 1rem; }

.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 1.5rem 0 3rem; }
.pager a { font-weight: 600; }

.about-photo { margin: 0 0 2rem; }
.about-photo img { border-radius: 4px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--lichen); }

/* Placeholders for Jared to fill in before launch */
.tk { background: color-mix(in srgb, var(--gold) 22%, transparent); outline: 1px dashed var(--gold); padding: 0 .25em; border-radius: 2px; font-family: var(--sans); font-size: .92em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.25rem 0 3rem; font-size: .95rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .contours path { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 2.4s ease-out forwards; }
  .contours path:nth-child(2n) { animation-delay: .15s; }
  .contours path:nth-child(3n) { animation-delay: .3s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* ---------- Home hero: solid spruce field with light contours ---------- */
.home .site-header, .home .hero { background: var(--hero-bg); }
.home .brand, .home .hero h1 { color: var(--hero-ink); }
.home .brand:hover { color: var(--hero-soft); }
.home .nav a { color: var(--hero-soft); }
.home .nav a:hover { color: var(--hero-ink); }
.home .hero .lede, .home .hero-meta { color: var(--hero-soft); }
.home .hero .contours { color: #8cc2ad; opacity: .28; }
.home .hero .btn-primary { background: var(--hero-ink); color: var(--hero-bg); border-color: var(--hero-ink); }
.home .hero .btn-primary:hover { background: #dce3d3; border-color: #dce3d3; }
.home .hero .btn-quiet { color: var(--hero-ink); border-color: var(--hero-ink); }
.home .hero .btn-quiet:hover { background: rgba(255,255,255,.1); }
.home .hero-photo img { background: #2e5a4c; }
.home .hero a:focus-visible, .home .site-header a:focus-visible { outline-color: var(--gold); }
:root { --hero-bg: #21443a; --hero-ink: #f6f7f3; --hero-soft: #c7d6cd; }

/* Home hero: type-led, flat green */
.home .hero { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.home .hero .wrap { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.home .hero h1 { font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 600; max-width: 15ch; margin-bottom: .45em; }
.home .hero .lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); max-width: 34rem; line-height: 1.55; }
.home .hero-photo { margin: 0; }
.home .hero-photo img { width: 100%; max-width: 380px; height: auto; margin-left: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 28%; border-radius: 24px; box-shadow: 0 30px 60px rgba(0,0,0,.28); }
@media (max-width: 760px) {
  .home .hero .wrap { grid-template-columns: 1fr; }
  .home .hero-photo img { max-width: none; width: 100%; margin-left: 0; aspect-ratio: 4 / 3; object-position: 50% 22%; border-radius: 20px; }
}

/* About: the photo as shot, with the intro on the wall beside Jared */
.about-banner { position: relative; margin: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 5vw, 3.5rem); border-radius: 20px; overflow: hidden; aspect-ratio: 2 / 1; background: #e9ebe8; }
.about-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.about-banner .ab-copy { position: relative; max-width: 46%; padding: clamp(1.5rem, 4vw, 3.5rem); }
.about-banner h1 { color: #18241f; font-size: clamp(2rem, 4vw, 3.4rem); }
.about-banner .lede { color: #3d4a44; }
@media (max-width: 760px) {
  .about-banner { aspect-ratio: auto; border-radius: 0; background: none; overflow: visible; }
  .about-banner img { position: static; height: auto; aspect-ratio: 4 / 3; object-position: 78% 30%; border-radius: 16px; }
  .about-banner .ab-copy { max-width: none; padding: 1.5rem 0 0; }
  .about-banner h1 { color: var(--ink); }
  .about-banner .lede { color: var(--ink-soft); }
}

/* About: career timeline in the sidebar */
.facts .facts-title { font-size: .85rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; margin: 0 0 .75rem; }
.timeline { list-style: none; margin: 0 0 1.75rem; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1rem 1rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .38rem; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--spruce); }
.timeline li:first-child::before { background: var(--spruce); }
.timeline .when { display: block; font-size: .85rem; color: var(--ink-soft); }
.timeline .what { display: block; font-weight: 500; line-height: 1.4; }
.about-article .facts dl { border-top: 1px solid var(--line); padding-top: 1rem; }
.about-article .prose h2:first-child { margin-top: 0; }
.about-article + .section.contact, .about-article ~ .contact { margin-top: 0; }
@media (max-width: 900px) { .about-article aside { order: 0; } }

/* About: inline photo and hobbies gallery */
.prose .inline-photo { margin: 1.75rem 0; }
.prose .inline-photo img { width: 100%; border-radius: 12px; }
figcaption { font-family: var(--sans); font-size: .875rem; color: var(--ink-soft); margin-top: .5rem; line-height: 1.4; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.75rem 0 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--lichen); }
@media (max-width: 600px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery video { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--lichen); }

/* Working with me: recent example */
.example { border-left: 3px solid var(--spruce); padding-left: 1rem; color: var(--ink-soft); max-width: 38rem; }
