/* Casey Habermann: portfolio
   Design language: dark base, one green signal accent, soft center bloom.
   Theme is "B" (see theme-preview*.html). Every color lives in the vars below,
   change the palette here and the whole site follows. */

:root {
  /* bloom = the page background (brightest center, dark corners) */
  --bg-base:   #11141a;   /* dark corner / base the bloom fades into */
  --bloom-in:  #20493d;   /* bloom center (soft variant) */
  --bloom-mid: #16352c;   /* bloom midpoint */
  --bg-soft:   #181d24;   /* slightly raised panels (callouts) */
  --bg-card:   #1d222a;   /* cards */
  --line:      #2a3039;
  --text:      #e8ebee;
  --text-dim:  #97a0ab;
  --text-soft: #d8d5cd;   /* warm off-white for long copy; headings stay --text */
  --text-mute: #69727d;
  --accent:    #4ade80;   /* green signal */
  --accent-dim:#2fae63;
  --accent-ink:#04140b;   /* text on the accent */
  --good:      #4ade80;
  --radius:    14px;
  --maxw:      1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Cascadia Mono, self-hosted (SIL OFL 1.1, licence in assets/fonts/). Variable weight
   200-700 in one file. Windows has it already; this makes Mac and Linux match. */
@font-face{font-family:"Cascadia Mono"; src:url("fonts/CascadiaMono.woff2") format("woff2");
  font-weight:200 700; font-style:normal; font-display:swap;}
@font-face{font-family:"Cascadia Mono"; src:url("fonts/CascadiaMonoItalic.woff2") format("woff2");
  font-weight:200 700; font-style:italic; font-display:swap;}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  /* soft center bloom: lit in the middle of the viewport, falling to the dark
     base at the far corners. Fixed so it stays centered as the page scrolls. */
  background:
    radial-gradient(1250px 880px at 50% 40%,
      var(--bloom-in) 0%, var(--bloom-mid) 34%, rgba(17,20,26,0) 74%),
    var(--bg-base);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(17,20,26,0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  font-weight: 600; letter-spacing: 0.02em; font-size: 16px;
  display: flex; align-items: center; gap: 10px;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.nav-links { display: flex; gap: 28px; font-size: 15px; }
.nav-links a { color: var(--text-dim); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: 110px 0 70px; border-bottom: 1px solid var(--line); }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.05; letter-spacing: -0.02em; font-weight: 700;
  margin: 0 0 24px; max-width: 16ch;
}
/* headline is uniform weight/color, no two-tone (locked decision) */
.hero h1 .soft { color: inherit; }
.hero .lead {
  font-size: clamp(20px, 2.4vw, 23px); font-weight: 700; color: var(--text-dim);
  max-width: 56ch; margin: 0 0 36px;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-size: 15px; font-weight: 500;
  border: 1px solid var(--line); color: var(--text); transition: all .15s;
}
.btn:hover { border-color: var(--text-mute); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: #6ee79b; border-color: #6ee79b; }
.btn-hot { background: #b0303d; border-color: #cf4a57; color: #fff; font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.08) inset; }
.btn-hot:hover { background: #c43a48; border-color: #e05a66; color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.1) inset; }

/* ---------- sections ---------- */
section { padding: 72px 0; }
.section-head { margin-bottom: 40px; }
.section-head h2 {
  font-size: 13px; font-family: var(--mono); text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-mute); font-weight: 500; margin: 0;
}
/* headline-style section head: matches the timeline detail headlines (.panel h2), 2px bigger */
.section-head.headline h2 {
  font-family: var(--font); font-size: clamp(26px, 3vw, 34px);
  text-transform: none; letter-spacing: -.02em; line-height: 1.12;
  color: var(--text); font-weight: 700;
}

/* arc / story strip */
.arc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
       border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.arc .cell { background: var(--bg-card); padding: 26px 22px; }
.arc .when { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .04em; }
.arc .what { margin-top: 10px; font-size: 15px; color: var(--text-dim); line-height: 1.5; }
.arc .what strong { color: var(--text); font-weight: 600; }
@media (max-width: 760px){ .arc { grid-template-columns: 1fr 1fr; } }

/* ---------- timeline (the spine / centerpiece) ----------
   Bucket colors are defined here; the work buckets below reuse them so the eye
   connects a dot's color to the section it belongs to. */
:root {
  --b-found:    #bef264;   /* foundations / origin (early, learning): yellow-green */
  --b-applied:  #a3e635;   /* Applied AI */
  --b-harness:  #2dd4bf;   /* Harnesses */
  --b-research: #4ade80;   /* Research (brightest = now) */
}
.timeline { position: relative; max-width: 780px; margin: 0 auto; }
/* the spine line: dim at the top (origin), brightening toward now */
.timeline::before {
  content: ""; position: absolute; left: 11px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(to bottom, var(--b-found) 0%, var(--b-harness) 45%, var(--accent) 100%);
  opacity: .55;
}
.tl-item { position: relative; padding: 0 0 34px 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: 4px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg-base); border: 3px solid var(--c, var(--accent));
  box-shadow: 0 0 0 4px var(--bg-base), 0 0 12px -1px var(--c, var(--accent));
}
.tl-when {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .03em;
  color: var(--c, var(--accent)); font-weight: 500;
}
.tl-what { font-size: 16px; line-height: 1.55; margin-top: 5px; color: var(--text-dim); max-width: 62ch; }
.tl-what strong { color: var(--text); font-weight: 600; }
.tl-tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--bg-base); background: var(--c, var(--accent)); border-radius: 4px;
  padding: 1px 7px; margin-left: 8px; vertical-align: 2px; font-weight: 600;
}
/* legend mapping color → bucket, sits under the timeline */
.tl-legend { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center;
  margin-top: 36px; font-family: var(--mono); font-size: 12px; color: var(--text-mute); }
.tl-legend span { display: inline-flex; align-items: center; gap: 7px; }
.tl-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: inline-block; }

/* ---------- work buckets ---------- */
.bucket { margin-bottom: 44px; }
.bucket:last-child { margin-bottom: 0; }
.bucket-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 20px; flex-wrap: wrap; }
.bucket-head .swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); align-self: center; }
.bucket-head h3 {
  font-size: 14px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em;
  color: var(--text); margin: 0; font-weight: 600;
}
.bucket-head .desc { color: var(--text-mute); font-size: 13.5px; }

/* tags / distinct treatments on cards */
.card .tag .concept  { color: var(--b-applied); }
.card .tag .progress { color: var(--b-research); }

/* ---------- work grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 720px){ .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; transition: border-color .15s, transform .15s;
  display: flex; flex-direction: column; min-height: 200px;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.card .tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-mute); display: flex; gap: 10px; align-items: center; margin-bottom: 14px;
}
.card .tag .live { color: var(--good); }
.card .tag .video { color: var(--accent); }
.card h3 { font-size: 21px; margin: 0 0 10px; letter-spacing: -0.01em; }
.card p { color: var(--text-dim); font-size: 15px; margin: 0 0 18px; flex: 1; }
.card .metric {
  font-family: var(--mono); font-size: 13px; color: var(--text);
  border-top: 1px solid var(--line); padding-top: 14px; margin-top: auto;
}
.card .metric b { color: var(--accent); }
.card .more {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 14px; font-weight: 600; color: var(--accent);
  padding: 9px 16px; border-radius: 9px; border: 1px solid var(--accent-dim);
  margin-top: 16px; transition: all .15s;
}
.card:hover .more { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- prose (about / case study) ---------- */
.prose { max-width: 68ch; }
.prose h1 { font-size: clamp(30px,4.4vw,44px); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 8px; }
.prose .sub { color: var(--text-soft); font-size: 19px; margin: 0 0 40px; }
/* project dates: sit at the foot of each case study, just above the back link */
.prose .dates { font-size: 15px; font-weight: 600; color: var(--text); margin: 44px 0 0; }
.prose h2 { font-size: 22px; margin: 44px 0 14px; letter-spacing: -0.01em; }
.prose p { color: var(--text-soft); margin: 0 0 18px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul { color: var(--text-soft); padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.callout {
  background: var(--bg-soft); border-left: 3px solid var(--accent);
  padding: 16px 20px; border-radius: 0 8px 8px 0; margin: 24px 0; color: var(--text-dim);
  font-size: 15px;
}
.placeholder {
  border: 1px dashed var(--accent-dim); background: rgba(74,222,128,0.05);
  border-radius: 10px; padding: 18px 20px; margin: 22px 0;
  font-family: var(--mono); font-size: 13px; color: var(--accent); line-height: 1.6;
}

/* embedded artifact (e.g. the redacted brief, in its own light theme) */
.artifact { margin: 32px 0; }
.artifact-bar {
  display: flex; align-items: center; justify-content: flex-start; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-mute); margin-bottom: 12px;
}
/* prominent "open the doc" button: left-aligned, high-visibility */
.artifact-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: .02em;
  text-transform: none; color: var(--accent-ink); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 10px; padding: 11px 20px;
  box-shadow: 0 0 0 1px var(--accent-dim), 0 6px 18px -6px var(--accent);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.artifact-btn:hover {
  background: #5cf08f; transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--accent), 0 9px 24px -6px var(--accent);
}
.artifact-btn .arrow { font-size: 15px; line-height: 1; }
.artifact-frame {
  width: 100%; height: 640px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #f0f2f5; box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

/* role / contribution split for case studies */
.role { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0; }
@media (max-width: 640px){ .role { grid-template-columns: 1fr; } }
.role .col { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.role .col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-mute); margin: 0 0 12px; font-weight: 600; }
.role .col.mine { border-color: var(--accent-dim); }
.role .col.mine h4 { color: var(--accent); }
.role ul { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: 14.5px; }
.role li { margin-bottom: 7px; line-height: 1.5; }

/* stat row for case studies */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 30px 0; }
@media (max-width: 640px){ .stats { grid-template-columns: 1fr; } }
.stat { background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.stat .n { font-size: 30px; font-weight: 700; color: var(--accent); font-family: var(--mono); letter-spacing: -0.02em; }
.stat .l { font-size: 13px; color: var(--text-dim); margin-top: 6px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 50px 0; margin-top: 40px; }
.foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; align-items: center; }
.foot-inner .meta { color: var(--text-mute); font-size: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; }
.foot-links a { color: var(--text-dim); }
.foot-links a:hover { color: var(--accent); }

.backlink { font-size: 18px; font-weight: 600; color: var(--accent); display: inline-block; padding: 12px 0; min-height: 44px; margin-bottom: 18px; }
.backlink:hover { color: var(--accent); }

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .nav-inner { gap: 16px; }
  .brand { white-space: nowrap; font-size: 14.5px; gap: 8px; }
  .nav-links { gap: 12px; font-size: 13.5px; }
}

/* ---------- case study: spec sheet margins (v1.0, 2026-10-14) ----------
   Dates sit top left, every h2 becomes a label in a 220px margin column with
   its content beside it. Phones stack the label above the content. */
.cs-back { font-size: 18px; font-weight: 600; color: var(--accent); display: inline-block; padding: 12px 0; min-height: 44px; margin-bottom: 20px; }
.cs-back:hover { color: var(--accent); }
.cs-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: end; padding: 14px 0 36px; }
.cs-head h1 { font-size: 56px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 12px; }
.cs-head .sub { font-size: 21px; color: var(--text-dim); margin: 0; line-height: 1.45; }
.cs-row { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); }
.cs-row .cs-label { font-family: var(--mono); font-size: 18px; font-weight: 600; color: var(--accent); line-height: 1.5; padding-top: 5px; }
.cs-row .cs-body { font-size: 17.5px; line-height: 1.75; color: var(--text-soft); }
.cs-body p { margin: 0 0 18px; }
.cs-body p:last-child { margin-bottom: 0; }
.cs-body ul { padding-left: 22px; margin: 0 0 18px; }
.cs-body li { margin-bottom: 8px; }
.cs-body strong { color: var(--text); font-weight: 600; }
.cs-body .cta-row { margin-top: 24px; }
.cs-panel { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin: 0 0 18px; }
.chip { display: inline-block; font-family: var(--mono); font-size: 14px; font-weight: 600; line-height: 1; padding: 5px 9px; border-radius: 10px; vertical-align: 1px; }
.chip-hot { background: var(--accent); color: var(--accent-ink); }
.chip-cool { border: 1px solid var(--line); color: var(--text-dim); }
.cs-pull { font-size: 22px; font-weight: 500; color: var(--text); line-height: 1.5; }
.cs-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 18px; }
.cs-card { background: var(--bg-card); border-radius: var(--radius); padding: 20px 22px; font-size: 16.5px; line-height: 1.6; }
.cs-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 22px; }
.cs-stat { padding: 20px 22px; border-left: 1px solid var(--line); }
.cs-stat:first-child { border-left: 0; }
.cs-stat .n { font-size: 36px; font-weight: 700; color: var(--accent); letter-spacing: -.02em; line-height: 1.1; }
.cs-stat .l { font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.cs-full { padding: 0 0 40px; }
.cs-full .artifact { margin: 0; }
.cs-foot { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin-top: 56px; }
.cs-foot a { font-size: 18px; font-weight: 600; color: var(--accent); display: inline-block; min-height: 44px; line-height: 44px; }
@media (max-width: 760px) {
  .cs-head, .cs-row { grid-template-columns: 1fr; gap: 10px; }
  .cs-head { padding-bottom: 28px; }
  .cs-head h1 { font-size: clamp(34px, 9vw, 44px); }
  .cs-head .sub { font-size: 19px; }
  .cs-row { padding: 26px 0; }
  .cs-cards, .cs-stats { grid-template-columns: 1fr; }
  .cs-stat { border-left: 0; border-top: 1px solid var(--line); }
  .cs-stat:first-child { border-top: 0; }
}

/* ---------- reduced motion: every animation and transition off ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
