:root {
  --bg: #efe7da;
  --bg-deep: #e3d6bf;
  --panel: rgba(255, 252, 246, 0.82);
  --panel-strong: rgba(255, 249, 241, 0.94);
  --ink: #162521;
  --muted: #4f5d57;
  --line: rgba(22, 37, 33, 0.11);
  --accent: #a34b1f;
  --accent-soft: #d48a4d;
  --olive: #5f7256;
  --shadow: 0 18px 50px rgba(34, 36, 28, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(163, 75, 31, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(95, 114, 86, 0.18), transparent 30%),
    linear-gradient(180deg, #f5efe5 0%, var(--bg) 50%, #e6dccd 100%);
  font-family: "Source Sans 3", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 28px;
}

.wordmark {
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.site-nav a + a::before {
  content: "|";
  margin-right: 18px;
  color: rgba(22, 37, 33, 0.34);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 44px;
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 138, 77, 0.55), rgba(212, 138, 77, 0));
  pointer-events: none;
}

.eyebrow,
.card-kicker,
.archive-label,
.status-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.panel h2,
.card h3,
.project-page h1,
.project-panel h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.04;
}

.hero h1 {
  max-width: 34ch;
  margin-inline: auto;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.2;
}

.hero-copy {
  max-width: 720px;
  margin: 22px auto 0;
  font-size: 1.18rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.button-primary {
  background: var(--ink);
  color: #f8f4ed;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(34, 36, 28, 0.16);
}

.button-primary:hover,
.button-primary:focus-visible {
  border-color: rgba(248, 244, 237, 0.18);
  background: #20332e;
}

.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.45);
  border-color: var(--line);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  align-items: center;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.tag-row li {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-right: 18px;
  padding: 7px 18px 7px 22px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-top: 1px solid rgba(22, 37, 33, 0.11);
  border-bottom: 1px solid rgba(22, 37, 33, 0.11);
  border-left: 1px solid rgba(22, 37, 33, 0.11);
  background: var(--segment-fill);
  box-shadow: 0 10px 24px rgba(34, 36, 28, 0.05);
}

.tag-row li:nth-child(1) {
  --segment-fill: rgba(246, 237, 223, 0.92);
}

.tag-row li:nth-child(2) {
  --segment-fill: rgba(246, 237, 223, 0.92);
}

.tag-row li:nth-child(3) {
  --segment-fill: rgba(246, 237, 223, 0.92);
}

.tag-row li:nth-child(4) {
  --segment-fill: rgba(246, 237, 223, 0.92);
}

.tag-row li:nth-child(5) {
  --segment-fill: rgba(246, 237, 223, 0.92);
}

.tag-row li:first-child::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -18px;
  width: 18px;
  height: calc(100% + 2px);
  background: var(--segment-fill);
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
  border-top: 1px solid rgba(22, 37, 33, 0.11);
  border-left: 1px solid rgba(22, 37, 33, 0.11);
  border-bottom: 1px solid rgba(22, 37, 33, 0.11);
}

.tag-row li::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -18px;
  width: 18px;
  height: calc(100% + 2px);
  background: var(--segment-fill);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  border-top: 1px solid rgba(22, 37, 33, 0.11);
  border-right: 1px solid rgba(22, 37, 33, 0.11);
  border-bottom: 1px solid rgba(22, 37, 33, 0.11);
}

.tag-row li + li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -18px;
  width: 18px;
  height: calc(100% + 2px);
  background: var(--segment-fill);
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
}

.tag-row li:last-child {
  margin-right: 0;
}

.section-block {
  margin-top: 34px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2,
.panel h2,
.project-panel h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.section-heading p:last-child {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.card-grid,
.archive-grid,
.two-column {
  display: grid;
  gap: 18px;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-column {
  grid-template-columns: 1.45fr 1fr;
}

.card,
.archive-card,
.project-panel {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 24px;
}

.card-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.card-link:hover,
.card-link:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(163, 75, 31, 0.48);
  box-shadow: 0 28px 60px rgba(34, 36, 28, 0.16);
  background: rgba(255, 252, 245, 1);
}

.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-link:hover h3,
.card-link:focus-visible h3,
.card-link:hover .card-cta,
.card-link:focus-visible .card-cta {
  color: var(--accent);
}

.card h3 {
  font-size: 1.45rem;
  margin-bottom: 12px;
}

.card p,
.archive-card span:last-child,
.project-panel p,
.project-panel li,
.stack-panel p,
.panel p {
  color: var(--muted);
}

.compact-list,
.link-list,
.project-panel ul {
  margin: 16px 0 0;
  padding-left: 18px;
}

.compact-list li,
.project-panel li {
  margin-top: 6px;
}

.card-cta {
  display: inline-flex;
  align-self: flex-end;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 16px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
  transition: transform 180ms ease, color 180ms ease;
}

.card-link:hover .card-cta,
.card-link:focus-visible .card-cta {
  transform: translateX(4px);
}

.stack-panel {
  padding: 28px;
}

.link-list {
  margin-top: 12px;
}

.link-list li {
  margin-top: 10px;
  font-weight: 700;
}

.status-note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.status-entry {
  margin: 0 0 14px;
}

.status-entry:last-child {
  margin-bottom: 0;
}

.status-entry strong {
  color: var(--ink);
}

.semantic-panel {
  overflow: hidden;
}

.semantic-intro {
  max-width: 56ch;
}

.semantic-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.semantic-reset,
.semantic-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-weight: 700;
}

.semantic-reset {
  padding: 9px 13px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.semantic-reset:disabled {
  opacity: 0.48;
  cursor: default;
}

.semantic-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.semantic-chip {
  padding: 7px 9px;
  font-size: 0.84rem;
  line-height: 1.15;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.semantic-chip:hover,
.semantic-chip:focus-visible,
.semantic-reset:hover,
.semantic-reset:focus-visible {
  border-color: rgba(163, 75, 31, 0.44);
  background: rgba(255, 250, 244, 0.98);
}

.semantic-chip:hover,
.semantic-chip:focus-visible {
  transform: translateY(-1px);
}

.semantic-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #f8f4ed;
  box-shadow: 0 12px 26px rgba(22, 37, 33, 0.16);
}

.semantic-chip:focus-visible,
.semantic-reset:focus-visible,
.semantic-result-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.semantic-output {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.semantic-state {
  margin: 0;
  color: var(--muted);
}

.semantic-focus h3,
.semantic-results-heading,
.semantic-result-card h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.semantic-focus h3 {
  font-size: 1.3rem;
}

.semantic-focus p {
  margin: 12px 0 0;
  color: var(--muted);
}

.semantic-mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.semantic-mini-tags li {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.semantic-results-block {
  margin-top: 20px;
}

.semantic-results-heading {
  font-size: 1.08rem;
}

.semantic-results-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.semantic-result-card {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.semantic-result-card:hover,
.semantic-result-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(163, 75, 31, 0.42);
  box-shadow: 0 18px 38px rgba(34, 36, 28, 0.12);
  background: rgba(255, 251, 245, 0.98);
}

.semantic-result-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.semantic-result-card h4 {
  font-size: 1.08rem;
}

.semantic-result-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.semantic-note {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(163, 75, 31, 0.18);
  background: rgba(255, 249, 241, 0.84);
  color: var(--muted);
}

.archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-card {
  display: block;
  padding: 22px;
  text-decoration: none;
}

.archive-card strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
}

.site-footer {
  padding: 28px 6px 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.project-page {
  max-width: 980px;
}

.project-hero {
  padding: 36px;
}

.project-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  max-width: 12ch;
}

.project-summary {
  max-width: 760px;
  margin-top: 18px;
  font-size: 1.12rem;
  color: var(--muted);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.project-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin-top: 22px;
}

.project-panel {
  padding: 24px;
}

.project-panel h2 {
  margin-bottom: 12px;
}

.project-panel p + p {
  margin-top: 14px;
}

.project-panel ul {
  margin-top: 12px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 920px) {
  .card-grid,
  .archive-grid,
  .two-column,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 32px 24px;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 22px;
  }

  .site-nav {
    gap: 12px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .tag-row {
    gap: 8px;
  }

  .tag-row li {
    margin-right: 0;
    padding: 7px 14px;
    border-right: 1px solid rgba(22, 37, 33, 0.11);
    clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  }

  .tag-row li::before,
  .tag-row li::after {
    display: none;
  }
}
