/* ==========================================================================
   Thynkta — shared stylesheet
   ========================================================================== */

:root {
  --ground: #f2f3f4;
  --surface: #ffffff;
  --ink: #16191d;
  --dim: #545d68;
  --faint: #8a939e;
  --rule: #dcdfe4;
  --accent: #0f6b47;
  --accent-soft: #e3efe9;

  /* The hero keeps its own world — a mill at night — in both themes. */
  --nightBg: #0d1c1b;
  --nightInk: #eaf2f0;
  --nightDim: #8fa8a4;
  --nightLine: #2b4d49;
  --nightLineLit: #48807a;
  --cpo: #e8873a;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #101315;
    --surface: #171b1e;
    --ink: #e8ebee;
    --dim: #99a2a9;
    --faint: #6d767d;
    --rule: #262c30;
    --accent: #4fbf8b;
    --accent-soft: #142c22;
  }
}
:root[data-theme="dark"] {
  --ground: #101315;
  --surface: #171b1e;
  --ink: #e8ebee;
  --dim: #99a2a9;
  --faint: #6d767d;
  --rule: #262c30;
  --accent: #4fbf8b;
  --accent-soft: #142c22;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

/* ==== Hero ================================================================ */
.hero {
  position: relative;
  background: var(--nightBg);
  color: var(--nightInk);
  overflow: hidden;
  padding: clamp(3rem, 9vw, 6rem) clamp(1.25rem, 5vw, 2rem) clamp(1.75rem, 5vw, 2.75rem);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 20% 0%,
    rgba(232, 135, 58, 0.10), transparent 65%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 660px; margin: 0 auto; }

.imprint {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.3em;
  color: var(--cpo);
  margin-bottom: 1.3rem;
}
.imprint a { color: inherit; }

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  font-weight: 680;
  letter-spacing: -0.04em;
  line-height: 1.03;
}
.hero .lede {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1rem, 2.2vw, 1.16rem);
  color: var(--nightDim);
  text-wrap: pretty;
}
.hero .lede b { color: var(--nightInk); font-weight: 560; }
.role {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--nightLineLit);
  margin-top: 1.5rem;
}

/* The plant, drawn. Left to right, the way the fruit actually moves. */
.schematic {
  display: block;
  width: 100%;
  max-width: 660px;
  margin: clamp(2rem, 5vw, 2.8rem) auto 0;
  position: relative;
  z-index: 1;
  overflow: visible;
}
.schematic .pipe { stroke: var(--nightLine); stroke-width: 1.5; fill: none; }
.schematic .vessel { stroke: var(--nightLineLit); stroke-width: 1.5; fill: none; stroke-linejoin: round; }
.schematic .tick { stroke: var(--nightLine); stroke-width: 1; }
.schematic text { font-family: var(--mono); font-size: 7px; letter-spacing: 0.12em; fill: var(--nightLine); }
.schematic .bead { fill: var(--cpo); }

@keyframes flow {
  0%   { transform: translateX(0); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateX(560px); opacity: 0; }
}
.schematic .bead { animation: flow 7s linear infinite; }

/* ==== Layout ============================================================== */
.wrap {
  max-width: 660px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 3.5rem) clamp(1.25rem, 5vw, 2rem) 5rem;
}

section { margin-bottom: clamp(2.5rem, 6vw, 3.5rem); }

.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 1.2rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--rule);
}

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

h2 {
  margin: 0 0 1.4rem;
  font-size: clamp(1.55rem, 4.2vw, 2.05rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.16;
  text-wrap: balance;
}
h3 {
  margin: 2.3rem 0 0.7rem;
  font-size: 1.07rem;
  font-weight: 630;
  letter-spacing: -0.015em;
}

p { margin: 0 0 1.1rem; color: var(--dim); text-wrap: pretty; }
p strong { color: var(--ink); font-weight: 570; }
p:last-child { margin-bottom: 0; }

blockquote {
  margin: 1.8rem 0;
  padding: 1.05rem 1.25rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 1.06rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.55;
}
blockquote p { color: inherit; margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==== Cards =============================================================== */
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.3rem 1.45rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.18s, transform 0.18s;
  color: inherit;
}
a.card:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }

.card h4 {
  margin: 0 0 0.2rem;
  font-size: 1.04rem;
  font-weight: 620;
  letter-spacing: -0.014em;
  color: var(--ink);
}
.card > p { margin: 0 0 0.85rem; font-size: 0.94rem; }

.meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; font-family: var(--mono); font-size: 10.5px; }
.meta span {
  padding: 0.22rem 0.55rem;
  border-radius: 5px;
  background: var(--ground);
  color: var(--faint);
  letter-spacing: 0.03em;
}
.meta b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.status {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 640;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: 0.2em;
}

.read-more {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* ==== Project showcase ==================================================== */
.showcase { display: grid; grid-template-columns: 232px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 560px) {
  .showcase { grid-template-columns: 1fr; gap: 1.1rem; }
  .showcase .art { max-width: 250px; margin: 0 auto; }
}
.caption {
  margin: 0.6rem 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: var(--faint);
  text-align: center;
}

/* ==== Back link =========================================================== */
.back {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--nightLineLit);
  margin-bottom: 1.5rem;
}
.back:hover { color: var(--cpo); text-decoration: none; }

footer {
  margin-top: 3rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.rise { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  .rise, .schematic .bead { animation: none; }
  a.card:hover { transform: none; }
}
