/* kaparulin.eu — "Shop Floor / Steel": slate ground, big condensed type, hazard stripe. */

:root {
  --bg: #1d2730;
  --panel: #26333e;
  --panel-2: #2b3945;
  --fg: #eef2f5;
  --muted: #aebac4;
  --line: #4b5b69;
  --ice: #9fd8ff;
  --stripe: #ffc400;
  --stripe-dark: #10171d;
  --max-width: 1160px;
  --read-width: 72ch;
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

a { color: var(--ice); }
a:hover { color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--stripe);
  outline-offset: 2px;
}

img, video { max-width: 100%; height: auto; }

/* ---------- display type ---------- */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0;
}

h1 { font-size: clamp(3.5rem, 11vw, 8.5rem); line-height: 0.88; margin: 0 0 1.5rem; }
h2 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  display: inline-block;
  border-bottom: 6px solid var(--stripe);
}
h3 { font-size: 2rem; margin: 0 0 0.5rem; }
h5 { font-size: 1.1rem; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 0.75rem; }

/* ---------- hazard stripe + nav ---------- */

.stripe {
  height: 18px;
  background-image: repeating-linear-gradient(
    -45deg, var(--stripe) 0, var(--stripe) 22px, var(--stripe-dark) 22px, var(--stripe-dark) 44px);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: flex-end;
}

.nav-links a, .mobile-menu a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  display: inline-block;
  padding: 0.7rem 0;
}
.nav-links a:hover { color: var(--stripe); }
.nav-links a.active { color: var(--stripe); box-shadow: inset 0 -4px 0 var(--stripe); }

.nav-cta {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--stripe);
  color: var(--stripe-dark);
  padding: 0.6rem 1.25rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-cta:hover { background: var(--fg); color: var(--bg); }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 2px solid var(--fg);
  cursor: pointer;
  position: relative;
}
.burger span, .burger span::before, .burger span::after {
  content: "";
  position: absolute;
  left: 9px;
  width: 22px;
  height: 3px;
  background: var(--fg);
}
.burger span { top: 19px; }
.burger span::before { top: -8px; left: 0; }
.burger span::after { top: 8px; left: 0; }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--bg);
  padding: 4rem 1.5rem 2rem;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 2.5rem; font-weight: 800; }
.mobile-menu .close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
  background: none;
  color: var(--fg);
  border: 2px solid var(--fg);
  cursor: pointer;
}

/* ---------- home ---------- */

.hero { padding: 1rem 0 3rem; }
.hero .lede { font-size: 1.25rem; max-width: 46rem; color: var(--fg); }
.hero .lede p { margin: 0 0 1rem; }

.project-grid, .recent-updates, .contact { margin-top: 4rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  display: block;
  background: var(--panel);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--fg);
  border-top: 0 solid var(--stripe);
  transition: border-width 0.1s;
}
.card:hover { border-top-width: 8px; background: var(--panel-2); color: var(--fg); }
.card h3 { margin-top: 0; color: #fff; }
.card p { margin: 0; color: var(--muted); font-size: 1rem; }

.see-all {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- lists (updates, project pages) ---------- */

.update-list, .list ul, .recent-updates ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.update-list li, .list ul li, .recent-updates li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
  font-weight: 600;
}
.update-list li a, .list ul li a, .recent-updates li a { text-decoration: none; color: var(--fg); }
.update-list li a:hover, .list ul li a:hover, .recent-updates li a:hover { color: var(--stripe); }

.update-list time, .list ul time, .recent-updates time {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  white-space: nowrap;
}

.project-tag { color: var(--muted); font-size: 0.9rem; font-weight: 400; margin-right: auto; }
.empty { color: var(--muted); }

/* ---------- articles ---------- */

.single header time { color: var(--muted); }
.content { max-width: var(--read-width); }
.list > .content { margin-bottom: 2rem; }

.content h2 { margin-top: 3rem; }
.content h3 { margin-top: 2rem; }
.content p, .content li { color: #dde4ea; }
.content img { display: block; margin: 1.5rem 0; }
.content blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  border-left: 6px solid var(--stripe);
  background: var(--panel);
}
.content code {
  background: var(--panel);
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}
.content pre {
  background: #141b21;
  padding: 1rem;
  overflow-x: auto;
  line-height: 1.45;
}
.content pre code { background: none; padding: 0; }
.content table { border-collapse: collapse; display: block; overflow-x: auto; }
.content th, .content td { border: 1px solid var(--line); padding: 0.5rem 0.75rem; text-align: left; }
.content th { background: var(--panel); }

/* ---------- contact ---------- */

.contact form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 460px;
}

.contact input, .contact textarea {
  padding: 0.75rem;
  background: var(--panel);
  color: var(--fg);
  border: 2px solid var(--line);
  font: inherit;
}
.contact input::placeholder, .contact textarea::placeholder { color: var(--muted); }

.contact button {
  align-self: flex-start;
  min-height: 44px;
  padding: 0.6rem 1.75rem;
  background: var(--stripe);
  color: var(--stripe-dark);
  border: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.contact button:hover { background: #fff; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; min-height: 1.5em; color: var(--ice); }
.contact .note { color: var(--muted); font-size: 0.9rem; max-width: 460px; }

/* ---------- comments ---------- */

.comments { max-width: var(--read-width); margin: 4rem 0 0; }
.comments h3 { margin-top: 2rem; }
.comment {
  background: var(--panel);
  border-left: 6px solid var(--line);
  padding: 0.75rem 1.1rem;
  margin: 0 0 1rem;
}
.comment header, .reply > strong { display: inline; }
.comment time, .reply time { margin-left: 0.75rem; color: var(--muted); font-size: 0.85rem; }
.comment-body { margin: 0.35rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply {
  margin: 0.9rem 0 0.25rem 1rem;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 6px solid var(--stripe);
}

/* ---------- footer ---------- */

footer { margin-top: 2rem; background: #141b21; }
footer::before { content: ""; display: block; height: 10px;
  background-image: repeating-linear-gradient(-45deg, var(--stripe) 0, var(--stripe) 22px, var(--stripe-dark) 22px, var(--stripe-dark) 44px); }

.foot {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
}
.foot p { color: var(--muted); font-size: 1rem; margin: 0.75rem 0 0; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot ul li a { display: inline-block; padding: 0.35rem 0; }

.foot-bot {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- responsive ---------- */

@media (max-width: 800px) {
  .nav-links, .nav-cta { display: none; }
  .nav-inner { justify-content: space-between; }
  .burger { display: block; }
  .foot { grid-template-columns: 1fr 1fr; }
  body { font-size: 17px; }
}

@media (max-width: 480px) {
  .foot { grid-template-columns: 1fr; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.card-cover { display: block; width: calc(100% + 3rem); max-width: none; height: 190px; object-fit: cover; margin: -1.5rem -1.5rem 1rem; }
.project-hero { display: block; width: 100%; max-width: var(--read-width); margin: 0 0 2rem; border: 2px solid var(--line); }
.yt-link { display: inline-flex; align-items: center; gap: 0.6rem; }
.card-cover-empty { background-image: repeating-linear-gradient(-45deg, var(--panel-2) 0, var(--panel-2) 22px, var(--bg) 22px, var(--bg) 44px); }

/* ---------- drafts (local preview only; drafts are never built for the live site) ---------- */
.draft-badge { display: inline-block; vertical-align: middle; margin-left: 0.5rem; padding: 0.1rem 0.5rem; font-family: var(--font-display); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stripe-dark); background: var(--stripe); }
.draft-banner { margin: 0 0 1.5rem; padding: 0.6rem 1rem; font-weight: 600; color: var(--stripe-dark); background-image: repeating-linear-gradient(-45deg, var(--stripe) 0, var(--stripe) 14px, #e0ad00 14px, #e0ad00 28px); }
.is-draft .content { border-left: 6px dashed var(--stripe); padding-left: 1.25rem; }
