/* michajluk.pl — Terminal Glass
   One stylesheet for the whole site. Change the accent in :root. */

:root {
  --accent: #157a15;              /* buttons, card borders, aura */
  --accent-text: #96c396;         /* accent used as text on dark bg (lighter, for contrast) */
  --on-accent: #ffffff;           /* text on accent buttons */
  --accent-rgb: 21, 122, 21;      /* same as --accent, for rgba() */

  --bg: #0b0e13;
  --text: #e1e6ec;
  --text-2: #c3cbd5;
  --muted: #9aa4b0;
  --amber: #f2b866;
  --line: rgba(255, 255, 255, .10);

  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;

  --code-opacity: .12;
  --gutter: 96px;
  --maxw: 1200px;                 /* max content width; page is centred on wider screens */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); }
a:hover { color: #c8f7cc; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }

.mono  { font-family: var(--mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent-text); }
.amber { color: var(--amber); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Fixed background: aura + code ---------- */
.aura {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(ellipse 45% 40% at 85% 12%, rgba(var(--accent-rgb), .38), transparent 70%),
    radial-gradient(ellipse 40% 35% at 10% 60%, rgba(121, 192, 255, .15), transparent 70%),
    radial-gradient(ellipse 35% 30% at 60% 95%, rgba(242, 184, 102, .10), transparent 70%),
    radial-gradient(ellipse 60% 50% at 30% 0%, rgba(var(--accent-rgb), .13), transparent 70%);
}
.code-layer {
  position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
  opacity: var(--code-opacity);
}
.code-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  column-gap: 56px; row-gap: 48px;
  padding: 40px 40px 8px; width: calc(100vw + 240px); /* covers any screen width */
}
.code-row:nth-child(even) { margin-left: -240px; }
.code-row pre {
  margin: 0; overflow: hidden;
  font: 15px/1.7 var(--mono); white-space: pre; color: #d7dce2;
}
.k { color: #ff7b72; } .t { color: #79c0ff; } .s { color: #a5d6ff; } .m { color: #d2a8ff; } .c { color: #8b949e; font-style: italic; }

/* ---------- Glass ---------- */
.glass {
  background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  -webkit-backdrop-filter: blur(18px) saturate(160%);
          backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 1px 0 rgba(255,255,255,.10) inset, 0 20px 50px rgba(0,0,0,.35);
}
.glass-soft {
  background: rgba(255,255,255,.04);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.10);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 12px;
  font: 500 16px var(--mono); color: var(--text); text-decoration: none;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { color: var(--text); transform: translateY(-1px); }
.btn--primary {
  background: var(--accent); color: var(--on-accent); font-weight: 700;
  box-shadow: 0 10px 30px rgba(var(--accent-rgb), .35), 0 1px 0 rgba(255,255,255,.25) inset;
}
.btn--primary:hover { color: var(--on-accent); }

/* ---------- Nav ---------- */
.nav-wrap { position: sticky; top: 16px; z-index: 50; padding: 16px 48px 0; }
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px 10px 28px; border-radius: 16px;
  font: 15px var(--mono);
}
.nav__brand { font-weight: 700; color: var(--text); text-decoration: none; }
.nav__links { display: flex; gap: 28px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--text); text-decoration: none; }
.nav__links a:hover { color: var(--accent-text); }
.lang { color: var(--muted); }
.lang a { display: inline-block; padding: 10px 4px; color: var(--muted); text-decoration: none; }
.lang a[aria-current="true"] { color: var(--accent-text); }
.nav__toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  background: rgba(255,255,255,.06); color: var(--text); cursor: pointer;
}
.nav__toggle .icon-close { display: none; }
.nav[data-open="true"] .nav__toggle .icon-open { display: none; }
.nav[data-open="true"] .nav__toggle .icon-close { display: block; }

/* ---------- Layout ---------- */
main { flex: 1; }

/* Centred column: content never wider than --maxw, side padding = --gutter */
.hero, .section, .nav-wrap, .footer {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
}
.section { padding: 64px var(--gutter); display: flex; flex-direction: column; gap: 36px; }
.section-title { font: 700 34px/1.2 var(--mono); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* ---------- Hero ---------- */
.hero {
  padding: 96px var(--gutter);
  display: grid; grid-template-columns: 7fr 5fr; gap: 32px; align-items: center;
}
.hero__text { display: flex; flex-direction: column; gap: 28px; }
.pill { align-self: flex-start; padding: 8px 14px; border-radius: 999px; font: 14px var(--mono); color: var(--text-2); }
.hero h1 { font: 800 76px/1.04 var(--mono); letter-spacing: -.04em; }
.hero__lead { font-size: 21px; color: var(--text-2); max-width: 560px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

.terminal { border-radius: 20px; overflow: hidden; font: 15px/1.8 var(--mono); }
.terminal__bar {
  display: flex; gap: 8px; align-items: center; padding: 14px 18px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.04);
}
.terminal__bar i { width: 12px; height: 12px; border-radius: 50%; }
.terminal__bar i:nth-child(1) { background: #ff5f57; }
.terminal__bar i:nth-child(2) { background: #febc2e; }
.terminal__bar i:nth-child(3) { background: #28c840; }
.terminal__bar span { margin-left: 10px; font-size: 13px; color: var(--muted); }
.terminal__body { padding: 22px 24px; }
.terminal__body p { color: var(--text-2); }
.terminal__body .cmd { color: var(--text); }
.terminal__body .cmd + p { margin-bottom: 0; }
.terminal__body .gap { margin-top: 10px; }
.cursor { display: inline-block; width: .6em; background: var(--text); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Services ---------- */
.service { padding: 32px; border-radius: 20px; display: flex; flex-direction: column; gap: 12px; }
.service h3 { font: 700 20px var(--mono); color: var(--accent-text); }
.service p { color: var(--text-2); }

/* ---------- Process ---------- */
.process { border-radius: 20px; padding: 12px; display: flex; gap: 8px; font-family: var(--mono); list-style: none; margin: 0; }
.process li { flex: 1; padding: 22px; border-radius: 14px; display: flex; flex-direction: column; gap: 10px; }
.process li:last-child { background: rgba(255,255,255,.06); }
.process li + li { position: relative; }
.process li + li::before {
  content: "→"; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  color: var(--accent-text); font-size: 22px;
}
.process strong { font-size: 20px; }
.process span { font: 16px/1.55 var(--sans); color: var(--text-2); }

/* ---------- Projects (rendered by js/projects.js) ---------- */
#projects-list { display: flex; flex-direction: column; gap: 24px; }
.project-card {
  display: flex; gap: 40px; align-items: center;
  padding: 40px; border-radius: 24px;
  border-color: rgba(var(--accent-rgb), .6);
}
.project-card__body   { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.project-card__status { font-size: 14px; }
.project-card__status.is-live    { color: var(--accent-text); }
.project-card__status.is-testing { color: var(--amber); }
.project-card__name   { font-size: 36px; font-weight: 800; line-height: 1.15; }
.project-card__desc   { font-size: 18px; color: var(--text-2); max-width: 620px; }
.project-card__stack  { font-size: 13px; }
.project-card__link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  font-size: 14px; color: var(--text); text-decoration: none;
}
.project-card__link svg { color: var(--accent-text); }
.project-card__link:hover { color: var(--text); background: rgba(255,255,255,.08); }
.project-card__shot {
  width: 280px; height: 190px; flex-shrink: 0; border-radius: 14px; object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font: 14px var(--mono); color: var(--muted);
}
.nda-label { margin-top: 8px; font-size: 14px; }
.nda-list  { border-radius: 20px; padding: 8px 36px; }
.nda-item {
  display: grid; grid-template-columns: 4fr 6fr 2fr; column-gap: 32px;
  padding: 30px 0; border-bottom: 1px solid var(--line);
}
.nda-item:last-child { border-bottom: 0; }
.nda-item__name  { font-size: 20px; font-weight: 700; line-height: 1.35; }
.nda-item__desc  { color: var(--text-2); }
.nda-item__stack { font-size: 13px; line-height: 1.7; }

/* ---------- Stack & certificates ---------- */
.panel { padding: 32px; border-radius: 20px; display: flex; flex-direction: column; gap: 20px; }
.panel .section-title { font-size: 30px; }
.stack-json { font: 15px/1.9 var(--mono); }
.stack-json b { font-weight: 400; color: var(--amber); }
.certs { list-style: none; margin: 0; padding: 0; }
.certs li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.certs li:last-child { border-bottom: 0; }
.certs small { font: 14px var(--mono); color: var(--muted); }
.certs small.amber { color: var(--amber); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 7fr 5fr; gap: 24px; }
.about .panel p { font-size: 18px; color: var(--text-2); }
.tags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; list-style: none; margin: 0; padding: 0; font: 15px var(--mono); }
.tags li { padding: 18px; border-radius: 14px; }

/* ---------- Contact ---------- */
.contact { padding: 64px; border-radius: 28px; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.contact h2 { font: 800 64px/1.05 var(--mono); letter-spacing: -.03em; }
.contact p { font-size: 19px; color: var(--text-2); }
.contact__links { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-family: var(--mono); }
.contact__links a:not(.btn) { display: inline-flex; align-items: center; min-height: 52px; padding: 0 18px; }

/* ---------- Footer ---------- */
.footer { padding: 0 48px 24px; }
.footer__inner {
  padding: 20px 32px; border-radius: 16px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font: 13px var(--mono); color: var(--muted);
}
.footer__inner div { display: flex; gap: 24px; }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 1080px) {
  :root { --gutter: 48px; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 60px; }
}

@media (max-width: 820px) {
  :root { --gutter: 20px; --code-opacity: .10; }
  body { font-size: 15px; }

  .glass { -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%); }
  .code-row { grid-template-columns: 1fr; width: 100vw; padding: 24px 16px; row-gap: 36px; }
  .code-row:nth-child(even) { margin-left: 0; }
  .code-row pre { font-size: 11px; }
  .code-row pre:nth-child(n+4) { display: none; }

  .nav-wrap { top: 12px; padding: 12px 16px 0; }
  .nav { flex-wrap: wrap; padding: 8px 8px 8px 18px; }
  .nav__toggle { display: inline-flex; }
  .nav__right { display: flex; align-items: center; gap: 8px; }
  .nav__links {
    display: none; order: 3; width: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--line);
  }
  .nav[data-open="true"] .nav__links { display: flex; }
  .nav__links a { display: flex; align-items: center; min-height: 48px; padding: 0 10px; font-size: 16px; }

  .section { padding: 32px var(--gutter); gap: 20px; }
  .section-title { font-size: 24px; }
  .panel .section-title { font-size: 22px; }
  .grid-2, .about { grid-template-columns: 1fr; gap: 12px; }

  .hero { padding: 48px var(--gutter) 40px; gap: 22px; }
  .hero__text { gap: 22px; }
  .pill { font-size: 12px; }
  .hero h1 { font-size: 46px; }
  .hero__lead { font-size: 17px; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .terminal { font-size: 13px; border-radius: 16px; }

  .service, .panel { padding: 22px; border-radius: 16px; }
  .service h3 { font-size: 17px; }

  .process { flex-direction: column; padding: 8px 20px; gap: 0; }
  .process li { padding: 16px 0; border-radius: 0; border-bottom: 1px solid var(--line); background: none !important; }
  .process li:last-child { border-bottom: 0; }
  .process li + li::before { display: none; }
  .process strong { font-size: 17px; }
  .process span { font-size: 15px; }

  .project-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 22px; border-radius: 18px; }
  .project-card__body { display: contents; }
  .project-card__name { font-size: 28px; }
  .project-card__desc { font-size: 15px; }
  .project-card__shot { width: 100%; height: 180px; order: 1; }
  .project-card__link { align-self: stretch; justify-content: center; min-height: 48px; order: 2; }
  .nda-list { padding: 4px 20px; border-radius: 16px; }
  .nda-item { grid-template-columns: 1fr; row-gap: 8px; padding: 20px 0; }
  .nda-item__name { font-size: 17px; }

  .stack-json { font-size: 13px; }
  .certs li { font-size: 15px; }
  .about .panel p { font-size: 15px; }
  .tags { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
  .tags li { padding: 10px 14px; border-radius: 999px; }

  .contact { padding: 28px 22px; border-radius: 22px; gap: 18px; align-items: stretch; }
  .contact h2 { font-size: 36px; }
  .contact p { font-size: 15px; }
  .contact__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .contact__links .btn { grid-column: 1 / -1; }
  .contact__links a:not(.btn) {
    justify-content: center; min-height: 48px; padding: 0; border-radius: 12px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10); text-decoration: none;
  }

  .footer { padding: 0 16px 20px; }
  .footer__inner { flex-direction: column; padding: 18px 20px; }
  .footer__inner div { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .btn { transition: none; }
}
