/* ---------- Tokens (matching rekrytoi.darkkis.fi) ---------- */
:root {
  --bg: #e3ead7;
  --bg-alt: #d6e1c6;
  --surface: #f2f6ea;
  --ink: #1c2a18;
  --ink-soft: #4b5a41;
  --green: #2c4a2a;
  --green-soft: #c3d6b0;
  --brown: #6b4a28;
  --border: #c3d2af;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 6px;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--border); }

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}
.brand:hover { text-decoration: none; color: var(--green); }

.main-nav { display: flex; gap: 20px; font-size: 0.88rem; margin-left: auto; }
.main-nav a { color: var(--ink-soft); }
.main-nav a:hover { color: var(--green); text-decoration: none; }

.lang-toggle {
  font-family: var(--sans);
  font-size: 0.85rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--ink-soft);
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--green); }
.lang-sep { color: var(--border); margin: 0 2px; }
.lang-toggle[data-active="en"] [data-lang-opt="en"],
.lang-toggle[data-active="fi"] [data-lang-opt="fi"] {
  color: var(--green);
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero { padding: 44px 0 36px; }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 0 0 14px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.lede {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 56ch;
  font-size: 1.15rem;
  margin: 0 0 28px;
}

.aside-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brown);
  border: 1px solid var(--brown);
  border-radius: 999px;
  padding: 8px 18px;
  line-height: 1.4;
}
.aside-link:hover { background: var(--brown); color: #fff; text-decoration: none; }
.aside-link:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- Sections ---------- */
.section { padding: 52px 0; border-top: 1px solid var(--border); }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 1.4rem; margin-bottom: 22px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: inline-block;
  cursor: pointer;
}
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-ghost[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.btn-small { font-size: 0.85rem; padding: 7px 14px; }

/* ---------- Profile + gallery side by side ---------- */
.wrap-wide { max-width: 1240px; }
.showcase {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 28px;
  align-items: start;
}
.showcase-section { padding-top: 40px; }
.profile-col .section-title { margin-bottom: 22px; line-height: 1.6; }
.profile-col .fact { grid-template-columns: 1fr; gap: 2px; }
.profile-col .profile-card { padding: 22px 22px; }
@media (min-width: 901px) {
  .profile-col { position: sticky; top: 16px; }
}
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; }
  .profile-col .profile-card { max-width: none; }
}

/* ---------- Gallery ---------- */
.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 22px;
}
.gallery-head .section-title { margin: 0; }

.counter-badge {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* A little nod to old-web hit counters */
.odometer {
  font-family: "Courier New", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  background: var(--ink);
  color: #b8f28a;
  padding: 2px 6px 2px 8px;
  border-radius: 3px;
  border: 2px inset #6c7a61;
}

.carousel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 14px;
  outline: none;
}
.carousel:focus-visible { box-shadow: 0 0 0 2px var(--green); }

.stage {
  position: relative;
  height: min(70vh, 620px);
  min-height: 260px;
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

#slide {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.25s ease;
}
#slide.shown { opacity: 1; }

.empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
}
.empty[hidden] { display: none; }

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--green);
  font-size: 1.8rem;
  line-height: 1;
  padding: 0 0 4px;
  cursor: pointer;
}
.nav-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }
.nav-btn[disabled] { display: none; }
.nav-btn.prev { left: 12px; }
.nav-btn.next { right: 12px; }

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
}
.position { font-size: 0.9rem; color: var(--brown); font-weight: 600; font-variant-numeric: tabular-nums; }
.control-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Profile ---------- */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 26px 28px;
  max-width: 640px;
}

.profile-top { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.profile-top .eyebrow { margin-bottom: 2px; }
.avatar {
  width: 68px;
  height: 68px;
  flex: none;
  border-radius: 50%;
  background: var(--green-soft);
  border: 2px solid var(--green);
  display: grid;
  place-items: center;
  font-size: 2.1rem;
  background-size: cover;
  background-position: center;
}
.profile-name { font-size: 1.6rem; }

.facts { margin: 0; }
.fact {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.fact dt { font-weight: 600; color: var(--brown); font-size: 0.9rem; padding-top: 1px; }
.fact dd { margin: 0; color: var(--ink); }
.fact-sub { display: block; color: var(--ink-soft); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.fact dd .fact-sub[data-i18n] { display: inline; }

.tag-line span:not(.tag-sep) { color: var(--ink); }
.tag-sep { color: var(--brown); margin: 0 10px; opacity: 0.6; }

.speed-meter {
  display: block;
  margin-top: 8px;
  height: 8px;
  max-width: 260px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
}
.speed-meter span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--green-soft), var(--green), var(--brown));
  animation: zoomies 1.6s ease-in-out infinite alternate;
  transform-origin: left;
}
@keyframes zoomies { from { transform: scaleX(0.94); } to { transform: scaleX(1.08); } }
@media (prefers-reduced-motion: reduce) { .speed-meter span { animation: none; } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0 calc(22px + env(safe-area-inset-bottom, 0px));
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
}
.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .header-row { padding: 14px 16px; gap: 12px; }
  .hero { padding: 44px 0 40px; }
  .stage { height: 62vh; }
  .nav-btn { width: 40px; height: 40px; font-size: 1.5rem; }
  .nav-btn.prev { left: 6px; }
  .nav-btn.next { right: 6px; }
  .carousel { padding: 10px; }
  .profile-card { padding: 20px 18px; }
  .fact { grid-template-columns: 1fr; gap: 2px; }
}
