/* ---------------------------------------------------------
   Decision Clarity — portfolio hub
   Design concept: noise resolving into signal. One accent
   color (signal teal) marks "this is real and working";
   warm amber is reserved for the single primary action.
--------------------------------------------------------- */

:root {
  --bg: #f2f4f3;
  --surface: #ffffff;
  --ink: #16211d;
  --muted: #626d68;
  --muted-2: #8a948f;
  --line: #d8ded9;
  --signal: #2b6e5b;
  --signal-strong: #1f5245;
  --warm: #d98c3f;
  --warm-strong: #b96f27;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --max-width: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: var(--signal-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--signal);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  font-family: var(--font-display);
}

.skip-link:focus {
  left: var(--gutter);
  top: 1rem;
}

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

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

.site-header {
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--signal);
}

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

.hero {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.25rem, 3.2vw + 1rem, 3.5rem);
  max-width: 16ch;
}

.hero-lede {
  margin-top: 1.5rem;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1.125rem;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--ink);
  color: var(--ink);
}

.btn:hover {
  color: var(--ink);
  background: var(--surface);
}

.btn-primary {
  background: var(--warm);
  border-color: var(--warm-strong);
  color: #23150a;
}

.btn-primary:hover {
  background: var(--warm-strong);
  color: #23150a;
}

.pipeline-diagram {
  width: 100%;
  height: auto;
}

.pipeline-box {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.5;
}

.pipeline-box-accent {
  fill: var(--signal);
  stroke: var(--signal-strong);
}

.pipeline-label {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  fill: var(--ink);
  text-anchor: middle;
}

.pipeline-label-accent {
  fill: #ffffff;
  font-size: 0.9375rem;
}

.pipeline-arrow {
  stroke: var(--muted-2);
  stroke-width: 1.5;
}

.pipeline-arrowhead {
  fill: var(--muted-2);
}

.pipeline-flow-dot {
  fill: var(--signal);
  offset-path: path("M10,68 L430,68");
  animation: pipeline-flow 3.5s linear infinite;
}

@keyframes pipeline-flow {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-flow-dot {
    display: none;
  }
}

/* ---------- Work sections ---------- */

.work-section {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.work-section-dark {
  background: #101815;
  color: var(--ink);
  --bg: #101815;
  --surface: #182420;
  --ink: #eef2ef;
  --muted: #a7b6ae;
  --muted-2: #76867e;
  --line: #2a3a33;
  --signal: #8ce9c9;
  --signal-strong: #63d9b1;
}

.section-head {
  max-width: 56ch;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: 1.625rem;
  letter-spacing: -0.015em;
}

.section-head p {
  margin-top: 0.5rem;
  color: var(--muted);
}

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.5rem;
}

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0.5rem;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(22, 33, 29, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px -12px rgba(22, 33, 29, 0.22), 0 2px 8px rgba(22, 33, 29, 0.08);
  border-color: var(--signal);
}

.work-section-dark .card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.work-section-dark .card:hover,
.work-section-dark .card:focus-within {
  box-shadow: 0 20px 32px -14px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(140, 233, 201, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .card:hover,
  .card:focus-within {
    transform: none;
  }
}

.card-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--line);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .card-thumb img {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .card:hover .card-thumb img {
    transform: none;
  }
}

.card-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
}

.card-thumb-placeholder svg {
  width: 2.25rem;
  height: 2.25rem;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.card h3 {
  font-size: 1.125rem;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.tech-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tech-pills li {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.card-links {
  display: flex;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
}

.card-links a {
  text-decoration: none;
  border-bottom: 1px solid var(--signal-strong);
}

.card-status {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--muted);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--signal-strong);
}

/* ---------- Responsive ---------- */

@media (max-width: 56rem) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .pipeline-diagram {
    order: 2;
    max-width: 26rem;
  }

  .hero-copy {
    order: 1;
  }
}

@media (max-width: 26rem) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}
