/* ============================================================
   Jessica Bargenquast · portfolio site styles
   Plain CSS, no build step. Edit freely.

   Brand system: "Clay & Iron" (see jessica-brand-style-guide.html).
   Space Grotesk for headings, Inter for body. Tokens below are
   copied directly from the brand guide's :root block.
   ============================================================ */

:root {
  /* Colors */
  --iron:         #1E1E1C;
  --red-clay:     #B85A3A;
  --red-clay-dark:#9C4C30;
  --patina:       #5E7B7A;
  --patina-dark:  #4C6564;
  --bone:         #FAF8F5;
  --brass:        #D6A04E;
  --iron-soft:    #3A3A38;
  --iron-muted:   #7A7672;
  --clay-light:   rgba(184,90,58,0.06);
  --patina-light: rgba(94,123,122,0.06);
  --brass-light:  rgba(214,160,78,0.08);
  --surface:      #F2F1EE;
  --border:       #EBE7E2;
  --border-dark:  #D4D0CA;
  --white:        #FFFFFF;

  /* Semantic accent layer: swap these two lines to re-theme the whole
     site. Primary accent is Patina (teal); Red Clay is demoted to a
     secondary highlight so the palette reads less like a default AI clay. */
  --accent:       var(--patina);
  --accent-dark:  var(--patina-dark);
  --accent-tint:  var(--patina-light);
  --accent-2:     var(--red-clay);   /* secondary highlight: badges, small marks */

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Type scale (major third, 1.25 ratio) */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-md:   1.125rem;   /* 18px */
  --text-lg:   1.25rem;    /* 20px */
  --text-xl:   1.5rem;     /* 24px */
  --text-2xl:  1.875rem;   /* 30px */
  --text-3xl:  2.25rem;    /* 36px */
  --text-4xl:  3rem;       /* 48px */

  /* Spacing (8px grid) */
  --space-xs:  0.25rem;    /* 4px */
  --space-sm:  0.5rem;     /* 8px */
  --space-md:  1rem;       /* 16px */
  --space-lg:  1.5rem;     /* 24px */
  --space-xl:  2rem;       /* 32px */
  --space-2xl: 3rem;       /* 48px */
  --space-3xl: 4rem;       /* 64px */
  --space-4xl: 6rem;       /* 96px */

  /* Layout */
  --max-width:     1200px;
  --content-width: 720px;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--iron);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(184,90,58,0.18); }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.25rem, 5vw, var(--text-4xl)); line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: var(--text-2xl); line-height: 1.2; }
h3 { font-size: var(--text-lg); font-weight: 600; line-height: 1.3; }

.prose h2 { margin-top: 1.7em; }

p { margin: 0 0 1.1em; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent-dark);
  text-decoration-thickness: 2px;
}

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

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

.prose { max-width: var(--content-width); }

/* ---------- Header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--border-dark);
  background: var(--bone);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  padding-bottom: 18px;
}

.site-name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--iron);
  text-decoration: none;
}
.site-name:hover { color: var(--accent); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
}

.site-nav a {
  color: var(--iron-muted);
  text-decoration: none;
  padding: 2px 0;
}

.site-nav a:hover {
  color: var(--iron);
  text-decoration: underline;
  text-decoration-color: var(--border-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.site-nav a[aria-current="page"] {
  color: var(--iron);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ---------- Sections ---------- */

.section { padding: var(--space-3xl) 0; }
.section + .section { border-top: 1px solid var(--border); }

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--iron-muted);
  margin: 0 0 14px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--brass);
}

.lede {
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--iron-soft);
  max-width: 620px;
}

/* ---------- Hero ---------- */

.hero { padding: var(--space-4xl) 0 var(--space-3xl); }

.hero h1 { max-width: 760px; letter-spacing: -0.02em; }

.hero .lede { margin-top: 20px; }

.hero-actions {
  margin-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  min-height: 48px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: var(--accent-dark); }

.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 12px 30px;
}
.btn.secondary:hover { background: var(--accent-tint); }

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0 0;
}

.stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-xl);
}

.stat .num {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  display: block;
}

.stat .label {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--iron-muted);
  display: block;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--iron-soft); font-size: var(--text-base); margin-bottom: 0; }
.card p + p:not(.card-source) { margin-top: 0.9em; }
.card ul { color: var(--iron-soft); font-size: var(--text-base); margin: 0.6em 0 0.9em; padding-left: 20px; }
.card li { margin-bottom: 7px; }
.card p.card-source { margin-top: 1.25em; font-size: var(--text-sm); font-weight: 500; }

/* ---------- Insights (accordion) ---------- */

/* Year divider — doubles as an anchor target (id="y2026" etc.) */
.insights-year {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--iron-muted);
  max-width: 700px;
  margin: var(--space-2xl) 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}
.insights-year:first-of-type { margin-top: var(--space-xl); }

/* Each post is a native <details> so it collapses with no JS/build step */
.insight {
  max-width: 700px;
  padding: 0;              /* override .card padding; summary/body pad instead */
  overflow: hidden;        /* keep children clipped to the rounded corners */
}
.insight + .insight { margin-top: var(--space-md); }

.insight > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  padding: var(--space-lg);
}
.insight > summary::-webkit-details-marker { display: none; }

.insight-date {
  flex: 0 0 auto;
  min-width: 92px;
  white-space: nowrap;
  padding-top: 3px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--iron-muted);
}

.insight > summary h3 { flex: 1 1 auto; margin: 0; transition: color 0.15s ease; }
.insight > summary:hover h3 { color: var(--accent); }

/* Chevron built from a rotated border box — no icon asset needed */
.insight > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-right: 2px solid var(--iron-muted);
  border-bottom: 2px solid var(--iron-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.insight[open] > summary::after { transform: rotate(-135deg); }
.insight[open] > summary { padding-bottom: var(--space-sm); }

.insight-body { padding: 0 var(--space-lg) var(--space-lg); }
.insight-body p { color: var(--iron-soft); font-size: var(--text-base); margin-bottom: 0; }
.insight-body p + p:not(.card-source) { margin-top: 0.9em; }
.insight-body ul { color: var(--iron-soft); font-size: var(--text-base); margin: 0.6em 0 0.9em; padding-left: 20px; }
.insight-body li { margin-bottom: 7px; }
.insight-body p.card-source { margin-top: 1.25em; font-size: var(--text-sm); font-weight: 500; }

/* ---------- About ---------- */

.about-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 760px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
}

.about-photo img {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* ---------- Case study ---------- */

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 40px;
  padding: var(--space-lg) 0;
  border-top: 2px solid var(--iron);
  border-bottom: 1px solid var(--border);
  margin: var(--space-2xl) 0;
  font-size: var(--text-base);
}

.case-meta div span {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: var(--text-xs);
  color: var(--iron-muted);
  margin-bottom: 3px;
}

.pull {
  margin: var(--space-2xl) 0;
  padding-left: var(--space-lg);
  border-left: 3px solid var(--brass);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--text-xl);
  line-height: 1.4;
  color: var(--iron);
}

/* ---------- Resume ---------- */

.resume-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
}

.job {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
}

.job:first-of-type { border-top: 2px solid var(--iron); margin-top: var(--space-lg); }

.job-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  align-items: baseline;
}

.job-head h3 { margin: 0; }

.job-dates {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--iron-muted);
  white-space: nowrap;
}

.job-org {
  color: var(--iron-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  margin: 2px 0 14px;
}

.job ul { margin: 0; padding-left: 20px; }
.job li { margin-bottom: 9px; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.skills-grid .card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--iron-soft);
  font-size: var(--text-base);
}
.skills-grid .card li { margin-bottom: 7px; }

.cert-list { list-style: none; margin: 0; padding: 0; }
.cert-list li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
}
.cert-list .cert-meta { color: var(--iron-muted); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; }

.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  background: var(--white);
  border: 1px solid var(--accent-2);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  margin-left: 10px;
  vertical-align: middle;
}

/* ---------- Contact ---------- */

.contact-list { list-style: none; padding: 0; margin: var(--space-xl) 0 0; }
.contact-list li { padding: var(--space-md) 0; border-bottom: 1px solid var(--border); font-size: var(--text-md); }
.contact-list span {
  display: inline-block;
  min-width: 110px;
  font-family: var(--font-body);
  color: var(--iron-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-form {
  margin-top: var(--space-2xl);
  max-width: 560px;
}

.contact-form label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  font: inherit;
  font-family: var(--font-body);
  color: var(--iron);
  background: var(--white);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}

.contact-form .btn { cursor: pointer; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-dark);
  padding: var(--space-xl) 0 var(--space-2xl);
  margin-top: var(--space-2xl);
  font-size: var(--text-sm);
  color: var(--iron-muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 30px;
}

.site-footer a { color: var(--iron-muted); text-decoration-color: var(--border-dark); }
.site-footer a:hover { color: var(--accent); text-decoration-color: var(--accent); }

.footer-legal {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
  justify-content: flex-start;
  gap: 6px 18px;
}
.footer-legal a[aria-current="page"] { color: var(--iron); font-weight: 600; }

.footer-legal-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: var(--text-xs);
  color: var(--iron-muted);
  text-decoration: underline;
  text-decoration-color: var(--border-dark);
  text-underline-offset: 3px;
  cursor: pointer;
}
.footer-legal-btn:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--white);
  border-top: 3px solid var(--brass);
  box-shadow: 0 -6px 24px rgba(30, 30, 28, 0.10);
  padding: var(--space-lg) 24px;
}
.cookie-banner[hidden] { display: none; }

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
}

.cookie-banner-inner p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--iron-soft);
  max-width: 640px;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner .btn,
.cookie-banner .btn.secondary {
  padding: 10px 22px;
  min-height: auto;
  font-size: var(--text-sm);
}

@media (max-width: 640px) {
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .btn { flex: 1; }
}

/* ---------- Utilities ---------- */

.mt-0 { margin-top: 0; }
.center { text-align: center; }

/* ---------- Playbook ---------- */

.gate-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 560px;
}
.gate-card .contact-form { margin-top: var(--space-lg); }
.gate-note { font-size: var(--text-sm); color: var(--iron-muted); margin-top: var(--space-md); margin-bottom: 0; }

.playbook-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: var(--space-2xl);
  align-items: start;
}
@media (max-width: 900px) { .playbook-layout { grid-template-columns: 1fr; } }

.agent-chapter {
  border-top: 2px solid var(--iron);
  padding-top: var(--space-xl);
  margin-top: var(--space-2xl);
}
.agent-pain {
  font-size: var(--text-md);
  font-style: italic;
  color: var(--iron-soft);
  max-width: 640px;
}

.spec-list {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
  max-width: 800px;
  overflow: hidden;
}
.spec-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  border-top: 1px solid var(--border);
}
.spec-row:first-child { border-top: none; }
.spec-key {
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--iron-muted);
  border-right: 1px solid var(--border);
}
.spec-value { padding: var(--space-md) var(--space-lg); font-size: var(--text-base); }
.spec-value p { margin-bottom: 0.6em; }
.spec-value p:last-child, .spec-value ol:last-child { margin-bottom: 0; }
.spec-value ol { margin: 0; padding-left: 20px; }
.spec-value li { margin-bottom: 6px; }
@media (max-width: 620px) {
  .spec-row { grid-template-columns: 1fr; }
  .spec-key { border-right: none; padding-bottom: 4px; }
  .spec-value { padding-top: 4px; }
}

.precondition {
  background: var(--brass-light);
  border-left: 3px solid var(--brass);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  max-width: 750px;
}
.precondition .label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--iron);
  margin-bottom: 6px;
}
.precondition p { margin: 0; color: var(--iron-soft); }

.ready-list { list-style: none; margin: var(--space-xl) 0; padding: 0; max-width: 680px; }
.ready-list li {
  position: relative;
  padding: var(--space-md) 0 var(--space-md) 36px;
  border-bottom: 1px solid var(--border);
}
.ready-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 21px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  border-radius: 4px;
}

.table-wrap { overflow-x: auto; margin: var(--space-xl) 0; }
.playbook-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: var(--text-sm);
  line-height: 1.5;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.playbook-table th {
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--iron-muted);
  border-bottom: 2px solid var(--iron);
  padding: 12px 16px;
}
.playbook-table td {
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  vertical-align: top;
}
.playbook-table tr:last-child td { border-bottom: none; }
