/* Jimineering homepage */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/Inter-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/Inter-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/JetBrainsMono-Regular.woff2") format("woff2");
}

:root {
  /* colours come from forum-tokens.css (generated from the forum theme) */
  --primary: var(--btn-primary-bg);
  --on-primary: var(--btn-primary-text);
  --primary-hover: var(--btn-primary-bg-hover);
  --shadow: none;
  --font-sans: "Inter", Arial, sans-serif; /* the forum's --font-family */
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px;      /* forum cards/panels */
  --radius-btn: 8px;   /* forum .btn */
  --radius-tag: 4px;   /* forum tag pills */
  --radius-sm: 8px;
  --max: 1110px;       /* forum .wrap */
  --gutter: 16px;
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4; /* forum body: 16px / 22.4px */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  color: var(--text-strong);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em; /* forum headings */
}

p { margin: 0; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus); /* same ring as the forum theme */
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Buttons: the forum's .btn-primary and .btn-default */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  padding: 0.5em 0.65em;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: normal;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 0.9em; height: 0.9em; fill: currentColor; }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); font-weight: 600; }
.btn-primary:hover { background: var(--btn-primary-bg-hover); }
.btn-default { background: var(--btn-default-bg); color: var(--btn-default-text); }
.btn-default:hover { background: var(--btn-default-bg-hover); color: var(--btn-default-text-hover); }
.btn-lg { font-size: 1.1487em; padding: 0.5em 0.8em; } /* forum .btn-large */
.btn-small { font-size: 0.8706rem; padding: 0.5em 0.65em; } /* forum header buttons: 13.93px, 600 */

/* Header: same as the forum's .d-header (52px, 1px border, 1110px wrap, 36px logo) */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid var(--header-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 52px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 0.67rem;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 1; min-width: 0; }
.brand img { height: 36px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Hero */
.hero { padding: 56px 0 64px; }
.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero { padding: 96px 0 104px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 64px; }
}

.eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding: 1px 6px;
  border-radius: var(--radius-tag);
  background: var(--tag-bg);
  color: var(--tag-text);
  font-family: var(--font-mono);
  font-size: 0.8706rem;
}
.hero h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero .lead {
  margin-top: 20px;
  max-width: 34em;
  font-size: 1.125rem;
  color: var(--text-soft);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Answer card with code */
.answer-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.answer-head {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.answer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.tag {
  display: inline-block;
  padding: 0 6px;
  border-radius: var(--radius-tag); /* forum tag pill */
  background: var(--tag-bg);
  color: var(--tag-text);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}
.badge-accepted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: var(--radius-tag);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.6;
}
.badge-accepted svg { width: 12px; height: 12px; }
.answer-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.answer-body {
  padding: 16px 20px 20px;
}
.answer-body > p {
  color: var(--text-soft);
  font-size: 0.9375rem;
}
.code {
  margin: 14px 0 0;
  padding: 16px 0;
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  overflow-x: auto;
  tab-size: 4;
}
.code code { display: block; min-width: max-content; padding: 0 16px; font-family: inherit; }
.code .ln {
  display: inline-block;
  width: 2ch;
  margin-right: 16px;
  color: var(--code-gutter);
  text-align: right;
  user-select: none;
}
.tk-k { color: var(--code-keyword); }
.tk-c { color: var(--code-control); }
.tk-f { color: var(--code-function); }
.tk-cm { color: var(--code-comment); }
.tk-s { color: var(--code-string); }
.tk-n { color: var(--code-number); }
.tk-v { color: var(--code-variable); }
.answer-body > .answer-foot {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Sections */
.section { padding: 72px 0; }
.section-alt {
  background: var(--rail);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
@media (min-width: 960px) {
  .section { padding: 96px 0; }
}
.section-head { max-width: 40em; margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
  font-weight: 700;
}
.section-head p {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 1.0625rem;
}

/* Feature grid */
.features {
  display: grid;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 720px) {
  .features { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
.feature {
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: var(--radius-btn);
  background: var(--tag-bg);
  color: var(--tag-text);
}
.feature-icon svg { width: 20px; height: 20px; }
.feature h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.feature p { margin-top: 8px; color: var(--text-soft); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.tag-list .cat {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); font-size: 0.9375rem;
}
.tag-list .cat::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--cat); }
.cat-backend { --cat: var(--cat-backend); } .cat-devops { --cat: var(--cat-devops); } .cat-languages { --cat: var(--cat-languages); }
.cat-code-review { --cat: var(--cat-code-review); } .cat-databases { --cat: var(--cat-databases); } .cat-career { --cat: var(--cat-career); }
.tag-list { gap: 10px 16px; }

/* Steps */
.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 840px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
.step {
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: step;
}
.step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 0.9375rem;
}
.step h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.step p { margin-top: 8px; color: var(--text-soft); }

/* Audience + values */
.split {
  display: grid;
  gap: 48px;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
}
.split h2 {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  font-weight: 700;
}
.split .intro { margin-top: 14px; color: var(--text-soft); font-size: 1.0625rem; }
.check-list, .values {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.check-list li {
  position: relative;
  padding-left: 32px;
  margin-top: 14px;
  color: var(--text);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tag-bg);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: calc(0.2em + 4px);
  width: 6px;
  height: 10px;
  border: solid var(--tag-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.values li {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.values li:last-child { border-bottom: 1px solid var(--border); }
.values h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.values p { margin-top: 4px; color: var(--text-soft); }

/* Closing call to action: a forum-style card, green only on the primary button */
.cta-panel {
  padding: 48px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}
@media (min-width: 720px) {
  .cta-panel { padding: 56px 48px; }
}
.cta-panel h2 {
  color: var(--text-strong);
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2rem);
  font-weight: 700;
}
.cta-panel p {
  max-width: 34em;
  margin: 14px auto 0;
  color: var(--text-soft);
  font-size: 1.0625rem;
}
.cta-panel .cta-row { justify-content: center; }

/* Footer */
.site-footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.875rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 24px; width: auto; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-block;
  padding: 4px 0;
  color: var(--text-soft);
  text-decoration: none;
}
.footer-links a:hover { color: var(--text-strong); text-decoration: underline; }

/* Not found page */
.notfound {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
}
.notfound .code-label {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.9375rem;
}
.notfound h1 {
  margin-top: 12px;
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.notfound p.lead { margin-top: 16px; max-width: 32em; color: var(--text-soft); font-size: 1.125rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-header .header-actions, .skip-link { display: none; }
  body { background: #FAFAFA; color: #141414; }
}

/* Public Community Guidelines page (same text as the forum's /guidelines) */
.legal-body { max-width: 760px; padding-top: 40px; padding-bottom: 72px; }
.legal-body h1 { font-size: 2rem; font-weight: 700; margin: 0 0 16px; }
.legal-body h2 { font-size: 1.3195rem; font-weight: 700; margin: 32px 0 8px; }
.legal-body p, .legal-body ul, .legal-body ol { margin: 0 0 12px; }
.legal-body li { margin: 4px 0; }
.legal-body code { font-family: var(--font-mono); background: var(--tag-bg); color: var(--code-text); border-radius: var(--radius-tag); padding: 0 4px; font-size: 0.9em; }
.legal-body pre { background: var(--code-bg); color: var(--code-text); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; overflow-x: auto; }
.legal-body pre code { background: none; padding: 0; }
