/* grooveops homepage — editorial × terminal
 * Mockup D, scaled to production. Public face + future control-plane share these tokens.
 */

:root {
  --bg: #efeae0;
  --paper: #f6f2e9;
  --ink: #1a1815;
  --muted: #7a766c;
  --rule: #d8d0c0;
  --hot: #a66a1f;
  --ok: #5e7d3e;
  --warn: #a66a1f;
  --err: #a8483b;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #16140f;
  --paper: #1f1c16;
  --ink: #efeae0;
  --muted: #8a8578;
  --rule: #2e2a22;
  --hot: #d3a356;
  --ok: #9bc16f;
  --warn: #d3a356;
  --err: #d97f6f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--bg); }

/* topbar */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 1rem clamp(1rem, 3vw, 2.5rem);
  font-size: 11px; letter-spacing: .08em; color: var(--muted);
  border-bottom: 1px solid var(--rule); flex-wrap: wrap;
}
.topbar .left, .topbar .right { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.dot {
  display: inline-block; width: .45rem; height: .45rem;
  border-radius: 50%; background: var(--ok);
  margin-right: .4rem; vertical-align: middle;
  animation: beat 2s ease-in-out infinite;
}
@keyframes beat { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.85); } }
.toggle {
  cursor: pointer; background: none; border: 1px solid var(--rule);
  color: var(--ink); font: inherit; padding: .35rem .7rem;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.toggle:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* topbar anchors */
.anchors { display: flex; gap: 1.25rem; }
.anchors a {
  font-size: 11px; letter-spacing: .08em; color: var(--muted);
  border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.anchors a:hover, .anchors a.on { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 640px) { .anchors { display: none; } }

/* hero */
.hero {
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 3vw, 2.5rem) clamp(2rem, 5vw, 3.5rem);
  display: grid; grid-template-columns: 1fr 18rem; gap: 3rem;
  align-items: end; border-bottom: 1px solid var(--rule);
}
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; gap: 2rem; } }
.wordmark {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(3.5rem, 11vw, 9rem); letter-spacing: -.03em;
  line-height: .88; font-variation-settings: "opsz" 144;
}
.wordmark .tilde { color: var(--hot); font-style: italic; font-weight: 600; }
.lede {
  font-size: clamp(14px, 1.3vw, 16px);
  max-width: 72ch; color: var(--ink);
  line-height: 1.65; font-weight: 400; letter-spacing: .005em;
  margin-top: 1.5rem;
  text-align: left; hyphens: none; -webkit-hyphens: none;
  word-break: normal; overflow-wrap: normal;
}
.lede em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--hot); }

.meta-card {
  display: flex; flex-direction: column; gap: .85rem;
  padding: 1.25rem; border: 1px solid var(--rule);
  background: var(--paper); font-size: 12px;
}
.meta-card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.meta-card .k { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; }
.meta-card .v { color: var(--ink); font-weight: 500; }
.meta-card .v.hot { color: var(--hot); }
.meta-card hr { border: none; border-top: 1px dashed var(--rule); margin: .15rem 0; }

/* section */
.section { padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 3vw, 2.5rem) 1rem; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem;
  padding-bottom: .85rem; border-bottom: 1px solid var(--rule);
}
.section-head h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -.01em; }
.section-head h2 .num { color: var(--muted); font-family: var(--mono); font-weight: 400; font-size: .6em; letter-spacing: .18em; margin-right: .6rem; vertical-align: .2em; }
.section-head h2 em { font-style: italic; color: var(--muted); font-family: var(--serif); font-weight: 400; }
.section-head .filter { display: flex; gap: .4rem; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.filter button {
  cursor: pointer; background: none; border: 1px solid transparent;
  color: inherit; font: inherit; letter-spacing: .14em; text-transform: uppercase;
  padding: .3rem .6rem; transition: all .2s;
}
.filter button:hover { color: var(--ink); }
.filter button.on { color: var(--ink); border-color: var(--rule); background: var(--paper); }

/* grid — 12 cards in 2 rows of 6 on wide screens. Cards stay compact. */
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 1500px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; } }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .grid { grid-template-columns: 1fr; } }

/* compact card type at 6-col density */
@media (min-width: 1500px) {
  .name { font-size: 18px; }
  .blurb { font-size: 12px; line-height: 1.5; }
  .stack, .gh-link, .status { font-size: 9px; }
  .body { padding: .9rem 1rem 1rem; gap: .45rem; }
  .env-badge, .thumb-tag { font-size: 8px; padding: .2rem .4rem; }
}
.card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--rule);
  text-decoration: none; color: inherit; overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .25s, box-shadow .25s;
  position: relative;
}
.card:hover { transform: translateY(-3px); border-color: var(--ink); }
.card:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }
.thumb {
  aspect-ratio: 16/10; overflow: hidden; background: var(--bg);
  position: relative; border-bottom: 1px solid var(--rule);
}
.thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  display: block; transition: transform .8s cubic-bezier(.2,.8,.2,1), filter .35s;
}
.card:hover .thumb img { transform: scale(1.025); }
.thumb.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; text-align: center; padding: 1.25rem; line-height: 1.4;
}
.thumb.placeholder strong {
  display: block; font-family: var(--serif); font-style: italic;
  font-size: 1.6rem; color: var(--ink); font-weight: 600;
  letter-spacing: -.01em; margin-bottom: .25rem; text-transform: none;
}
.thumb-tag {
  position: absolute; top: .6rem; left: .6rem;
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  background: var(--paper); color: var(--ink);
  padding: .25rem .5rem; border: 1px solid var(--rule);
}
.thumb-tag.warn { background: var(--err); color: var(--paper); border-color: var(--err); }

.env-badge {
  position: absolute; top: .6rem; right: .6rem;
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  background: var(--paper); color: var(--ink);
  padding: .28rem .55rem; border: 1px solid var(--rule);
  display: inline-flex; align-items: center; gap: .35rem;
}
.env-badge::before {
  content: ""; width: .4rem; height: .4rem; border-radius: 50%;
  background: var(--ok); display: inline-block;
}
.env-badge.preview { color: var(--hot); border-color: var(--hot); }
.env-badge.preview::before { background: var(--hot); }
.env-badge.private { color: var(--muted); }
.env-badge.private::before { background: var(--muted); opacity: .7; }
.env-badge.retiring { color: var(--muted); text-decoration: line-through; }
.env-badge.retiring::before { background: var(--muted); opacity: .4; }

.body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.b-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.name { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.005em; }
.num-tag { font-size: 10px; color: var(--muted); letter-spacing: .18em; font-family: var(--mono); }
.blurb { font-size: 13px; line-height: 1.55; color: var(--ink); text-align: left; hyphens: none; -webkit-hyphens: none; word-break: normal; overflow-wrap: normal; }
.b-foot {
  margin-top: auto; padding-top: .75rem;
  display: flex; justify-content: space-between; align-items: baseline;
  gap: .75rem; border-top: 1px dashed var(--rule); flex-wrap: wrap;
}
.stack { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); flex: 1; min-width: 0; }
.gh-link {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid transparent;
  padding: 0; display: inline-flex; align-items: center; gap: .3rem;
  transition: color .2s, border-color .2s;
}
.gh-link:hover { color: var(--ink); border-bottom-color: var(--ink); }
.card:hover .gh-link { color: var(--ink); }
.gh-link svg { width: 11px; height: 11px; fill: currentColor; }
.status { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; display: inline-flex; align-items: center; gap: .4rem; }
.status::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--ok); display: inline-block; }
.status.beta::before { background: var(--warn); }
.status.gone::before { background: var(--muted); opacity: .5; }
.status.warn { color: var(--err); }
.status.warn::before { background: var(--err); }

/* profile (02) */
.profile { padding-bottom: clamp(2.5rem, 5vw, 4rem); }

.profile-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 880px) { .profile-grid { grid-template-columns: 1fr; gap: 1.75rem; } }

.bio p { font-size: 14px; line-height: 1.75; color: var(--ink); text-align: left; hyphens: none; -webkit-hyphens: none; word-break: normal; overflow-wrap: normal; }
.bio p + p { margin-top: .85rem; }
.bio em { font-family: var(--serif); font-style: italic; color: var(--hot); font-weight: 500; }
.bio .role {
  font-family: var(--mono); font-size: 13px; font-weight: 400;
  color: var(--muted); margin-bottom: 1.4rem;
  padding-bottom: 1rem; border-bottom: 1px dashed var(--rule);
  letter-spacing: .01em;
}
.bio .role em {
  font-family: var(--serif); font-size: clamp(20px, 2.4vw, 26px); font-weight: 600;
  font-style: normal; color: var(--ink); letter-spacing: -.01em;
  display: block; margin-bottom: .25rem;
}

.facts {
  display: flex; flex-direction: column; gap: .7rem;
  padding: 1.25rem; border: 1px solid var(--rule); background: var(--paper);
  font-size: 12px;
}
.facts .row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.facts .k { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; }
.facts .v { color: var(--ink); font-weight: 500; }
.facts .v.link { border-bottom: 1px solid var(--rule); transition: border-color .2s, color .2s; }
.facts .v.link:hover { color: var(--hot); border-color: var(--hot); }
.facts hr { border: none; border-top: 1px dashed var(--rule); margin: .15rem 0; }

/* cv archive — expandable rows */
.cv-archive { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.cv-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--rule); }
.cv-archive h4, .skills-block h4 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(16px, 1.8vw, 20px);
  letter-spacing: -.005em;
}
.cv-archive h4 em, .skills-block h4 em { font-style: italic; color: var(--muted); font-weight: 400; }
.cv-expand-all {
  cursor: pointer; background: none; border: 1px solid var(--rule);
  color: var(--muted); font: inherit; padding: .3rem .65rem;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.cv-expand-all:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.cv-cols, .cv-list summary {
  display: grid; align-items: baseline;
  grid-template-columns: 11ch minmax(18ch, 18%) minmax(18ch, 22%) 1fr 1.5rem;
  gap: 1.25rem;
}
.cv-cols {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding: .55rem 0; border-bottom: 1px solid var(--rule);
}

.cv-list { list-style: none; }
.cv-list li {
  display: grid;
  grid-template-columns: 11ch minmax(18ch, 18%) minmax(18ch, 22%) 1fr 1.5rem;
  gap: 0 1.25rem;
  border-bottom: 1px dashed var(--rule);
}
.cv-summary {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: subgrid; align-items: baseline;
  cursor: pointer; padding: .85rem 0;
  font: inherit; font-size: 12px; line-height: 1.5; text-align: left;
  background: none; border: none; color: inherit; width: 100%;
  transition: background .15s;
}
.cv-summary:hover { background: var(--paper); }
.cv-summary:focus-visible { outline: 2px solid var(--hot); outline-offset: -2px; }
.cv-summary .span { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.cv-summary .role { color: var(--muted); }
.cv-summary .where { color: var(--ink); font-weight: 500; }
.cv-summary .where strong { color: var(--ink); font-weight: 600; }
.cv-summary .what { color: var(--muted); line-height: 1.5; }
.cv-summary .what strong { color: var(--ink); font-weight: 500; }
.cv-summary .caret {
  color: var(--muted); font-family: var(--mono); font-size: 16px;
  text-align: center; user-select: none; transition: transform .2s, color .2s;
}
.cv-summary[aria-expanded="true"] .caret { transform: rotate(45deg); color: var(--hot); }
.cv-summary[aria-expanded="true"] { background: var(--paper); }
.cv-list .cv-detail { grid-column: 4 / 6; }

.cv-detail {
  padding: .25rem 0 1.25rem;
  background: var(--paper);
  animation: cv-open .25s ease-out;
}
@keyframes cv-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.cv-detail p { font-size: 13px; line-height: 1.7; max-width: 70ch; color: var(--ink); text-align: left; hyphens: none; -webkit-hyphens: none; word-break: normal; overflow-wrap: normal; }
.cv-detail p + p { margin-top: .7rem; }
.cv-detail em { font-family: var(--serif); font-style: italic; color: var(--hot); font-weight: 500; }
.cv-detail strong { font-weight: 600; color: var(--ink); }
.cv-detail .cv-stack {
  margin-top: 1rem; padding-top: .75rem; border-top: 1px dashed var(--rule);
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: baseline; font-size: 11px;
}
.cv-detail .cv-stack .rot-k { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; flex-shrink: 0; }
.cv-detail .cv-stack .rot-v { color: var(--ink); letter-spacing: .02em; }

@media (max-width: 880px) {
  .cv-cols { display: none; }
  .cv-list li {
    grid-template-columns: 11ch 1fr 1.5rem;
    gap: 0 1rem;
  }
  .cv-summary {
    grid-template-columns: 11ch 1fr 1.5rem;
    grid-template-areas:
      "span where caret"
      "span role  caret"
      "what what  what";
    gap: .35rem 1rem;
    padding: .9rem 0;
  }
  .cv-summary .span { grid-area: span; }
  .cv-summary .where { grid-area: where; }
  .cv-summary .role { grid-area: role; font-size: 11px; }
  .cv-summary .what { grid-area: what; padding-top: .35rem; font-size: 12px; }
  .cv-summary .caret { grid-area: caret; align-self: start; }
  .cv-list .cv-detail { grid-column: 1 / -1; padding: .25rem 0 1.25rem; }
}
@media (max-width: 720px) {
  .cv-archive table, .cv-archive thead, .cv-archive tbody, .cv-archive tr, .cv-archive td, .cv-archive th { display: block; }
  .cv-archive thead { display: none; }
  .cv-archive tr { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
  .cv-archive td { padding: .15rem 0; border: none; }
  .cv-archive td:nth-child(1) { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
}

/* skills block — visible & grouped */
.skills-block { margin-top: clamp(2rem, 4vw, 3rem); }
.skills-block h4 { padding-bottom: .6rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.25rem; }
.skills-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.5rem;
}
@media (max-width: 720px) { .skills-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.skills-group { display: flex; flex-direction: column; gap: .65rem; }
.skills-group .sg-k {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); padding-bottom: .4rem;
  border-bottom: 1px dashed var(--rule);
}
.skills-group .kw {
  list-style: none; display: flex; flex-wrap: wrap; gap: .35rem;
}
.skills-group .kw li {
  font-size: 11px; letter-spacing: .02em;
  padding: .3rem .6rem; border: 1px solid var(--rule);
  color: var(--ink); background: var(--paper);
  transition: border-color .2s, color .2s, background .2s;
}
.skills-group .kw li:hover { border-color: var(--ink); color: var(--hot); background: var(--bg); }

/* about (03) — restored 2-col tension */
.about {
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2.5rem);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.about-grid {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem; align-items: start;
}
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.about .section-head.plain { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.about-body { max-width: 65ch; }
.about-body p { font-size: 14px; line-height: 1.7; color: var(--ink); text-align: left; hyphens: none; -webkit-hyphens: none; word-break: normal; overflow-wrap: normal; }
.about-body p + p { margin-top: .85rem; }
.about em { font-family: var(--serif); font-style: italic; color: var(--hot); font-weight: 500; }

/* footer */
footer {
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem); font-size: 11px; color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  letter-spacing: .04em; margin-top: auto;
}
footer a { border-bottom: 1px solid var(--muted); }
footer a:hover { color: var(--ink); border-color: var(--ink); }

/* loading state */
.grid:empty::before {
  content: "loading fleet…";
  display: block; padding: 2rem 0;
  color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  .card:hover { transform: none; }
  .card:hover .thumb img { transform: none; }
}
