:root {
  --ink: #111827;
  --ink-soft: #344158;
  --muted: #617085;
  --teal: #0f6f67;
  --cyan: #12b8b0;
  --cyan-soft: #e7f8f5;
  --line: #dbe3ed;
  --paper: #ffffff;
  --canvas: #e9eef4;
  --sidebar: #edf7f3;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 2%, rgba(18, 184, 176, 0.12), transparent 26rem),
    var(--canvas);
  font: 400 15px/1.65 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
nav {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol {
  padding-bottom: 1em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1rem;
}

a {
  color: var(--teal);
  text-decoration: none;
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

a:hover {
  color: #0a4f4a;
}

a:focus-visible,
button:focus-visible {
  outline-color: var(--cyan);
}

img {
  max-width: 100%;
  border: 0;
}

#wrapper {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 32px;
  padding-top: 32px;
}

#content {
  overflow: visible;
  background: var(--paper);
  border: 1px solid rgba(219, 227, 237, 0.95);
  border-radius: 24px;
  box-shadow: 0 24px 76px rgba(15, 29, 53, 0.22);
}

header {
  width: auto;
  margin: 0;
  padding: 24px 34px;
  border-bottom: 1px solid var(--line);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand:hover {
  color: var(--teal);
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 44px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--cyan));
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(15, 111, 103, 0.22);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 15px;
  line-height: 1.1;
}

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px 18px;
}

.nav-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--teal);
}

.nav-social {
  padding-right: 4px;
}

.lang-switch {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lang-switch:hover {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.lang-switch img {
  width: 18px;
  height: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 17px;
  color: #fff;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(15, 111, 103, 0.16);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}

.button:hover {
  color: #fff;
  background: #0a5a54;
  border-color: #0a5a54;
  transform: translateY(-1px);
}

.button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button-small {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 11px;
}

.button-secondary {
  color: var(--teal);
  background: #fff;
  border-color: rgba(15, 111, 103, 0.35);
  box-shadow: none;
}

.button-secondary:hover {
  color: var(--teal);
  background: var(--cyan-soft);
  border-color: var(--teal);
}

#contents {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  width: auto;
  margin: 0;
  padding: 24px 34px 6px;
}

#contents > main {
  min-width: 0;
}

#contents.double-column > main {
  position: relative;
  z-index: 1;
}

#contents.single-column {
  display: block;
}

.hero {
  position: relative;
  overflow: hidden;
  margin: 0 8px 0 -8px;
  padding: 42px;
  background:
    radial-gradient(circle at 92% 12%, rgba(119, 228, 223, 0.28), transparent 15rem),
    linear-gradient(145deg, #fbfffd 0%, var(--sidebar) 100%);
  border: 1px solid #d6ebe5;
  border-radius: 20px;
  box-shadow:
    0 24px 44px rgba(15, 29, 53, 0.2),
    0 6px 16px rgba(15, 29, 53, 0.12);
  transform: rotate(-0.45deg);
  transform-origin: 40% 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero::before {
  position: absolute;
  inset: 0;
  background-image: url("images/anton-portrait.png");
  background-position: left center;
  background-size: 54% 100%;
  background-repeat: no-repeat;
  filter: grayscale(1) sepia(0.35) hue-rotate(88deg) saturate(0.62) contrast(0.78);
  opacity: 0.24;
  mix-blend-mode: multiply;
  transform: scaleX(-1);
  mask-image: linear-gradient(90deg, #000 0%, #000 34%, transparent 54%, transparent 100%);
  content: "";
  pointer-events: none;
}

.hero::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(247, 255, 253, 0.98) 0%, rgba(247, 255, 253, 0.3) 42%, rgba(247, 255, 253, 0) 78%),
    radial-gradient(circle at calc(100% - 95px) calc(100% - 19px), transparent 0 64px, rgba(18, 184, 176, 0.22) 65px, transparent 66px);
  content: "";
  pointer-events: none;
}

.eyebrow {
  padding-bottom: 14px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.hero h1 {
  padding-bottom: 6px;
  color: var(--ink);
  text-transform: uppercase;
}

.role-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 10px;
  padding-bottom: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.4;
  text-transform: uppercase;
}

.role-line strong {
  color: var(--cyan);
}

.role-line span {
  color: var(--muted);
}

.lead {
  max-width: 660px;
  padding: 22px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 0 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 630px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(15, 111, 103, 0.16);
}

.hero-stats div {
  display: grid;
  gap: 2px;
}

.hero-stats strong {
  color: var(--teal);
  font-size: 19px;
  line-height: 1.2;
}

.hero-stats span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-transform: uppercase;
}

.project-hero {
  position: relative;
  overflow: hidden;
  margin: 0 8px 0 -8px;
  padding: 42px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(119, 228, 223, 0.35), transparent 15rem),
    linear-gradient(145deg, #123746 0%, #0f6f67 100%);
  border: 1px solid #1c8078;
  border-radius: 20px;
  box-shadow:
    0 24px 44px rgba(15, 29, 53, 0.2),
    0 6px 16px rgba(15, 29, 53, 0.12);
  transform: rotate(-0.45deg);
  transform-origin: 40% 0;
}

.project-hero::after {
  position: absolute;
  right: -36px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.05), 0 0 0 44px rgba(255, 255, 255, 0.04);
  content: "";
  pointer-events: none;
}

.project-hero > * {
  position: relative;
  z-index: 1;
}

.project-hero .eyebrow {
  color: #9aeee7;
}

.project-hero h1,
.project-lead {
  color: #fff;
}

.project-lead {
  max-width: 680px;
  padding: 16px 0 0;
  font-size: 18px;
  line-height: 1.55;
}

.project-hero .button {
  color: var(--teal);
  background: #fff;
  border-color: #fff;
}

.project-hero .button:hover {
  color: var(--teal);
  background: #e7f8f5;
  border-color: #e7f8f5;
}

.project-hero .button-secondary {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.project-hero .button-secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 680px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.project-facts div {
  display: grid;
  gap: 2px;
}

.project-facts strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
}

.project-facts span {
  color: #b9e9e4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.project-overview ul {
  padding: 0 0 13px 20px;
}

.project-overview li {
  padding-bottom: 5px;
}

.cloud-story-hero {
  margin-bottom: 28px;
}

.cloud-story-hero h1 {
  max-width: 820px;
}

.cloud-story {
  width: min(100%, 920px);
  margin: 0 auto 48px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}

.cloud-story-opening {
  padding: 10px 4px 24px;
  font-size: 18px;
  line-height: 1.75;
}

.cloud-story-kicker,
.cloud-story-index {
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cloud-story-toc {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 22px;
  margin-bottom: 24px;
  padding: 26px 30px;
  background: var(--sidebar);
  border: 1px solid #d6ebe5;
  border-radius: 16px;
}

.cloud-story-toc strong {
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 14px;
}

.cloud-story-toc a {
  font-size: 14px;
  font-weight: 700;
}

.cloud-story-section {
  padding: 32px 4px 26px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.cloud-story-section h2 {
  max-width: 740px;
  padding: 0 0 20px;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  letter-spacing: -0.035em;
}

.cloud-story-section p {
  max-width: 780px;
}

.cloud-story-section code {
  padding: 0.12em 0.35em;
  background: var(--cyan-soft);
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.cloud-story-steps {
  max-width: 780px;
  padding-left: 1.5em;
}

.cloud-story-steps li {
  padding-bottom: 0.65em;
}

.cloud-story-quote {
  margin: 32px 0 0;
  padding: 28px 34px;
  color: var(--teal);
  background: var(--cyan-soft);
  border-left: 5px solid var(--cyan);
  border-radius: 0 16px 16px 0;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 700;
  line-height: 1.4;
}

.cloud-story-quote p {
  padding: 0;
}

.cloud-story-end {
  margin-top: 32px;
  padding: 30px 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 29, 53, 0.08);
}

.cloud-story-end .button {
  margin-top: 6px;
}

@media (max-width: 700px) {
  .cloud-story-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .cloud-story {
    font-size: 15px;
  }

  .cloud-story-opening {
    font-size: 16px;
  }

  .cloud-story-toc {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .cloud-story-quote,
  .cloud-story-end {
    padding: 24px;
  }
}

.welcome-note {
  margin: 21px 0 0 10px;
  padding: 28px 30px 16px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow:
    0 20px 38px rgba(15, 29, 53, 0.17),
    0 5px 14px rgba(15, 29, 53, 0.1);
  transform: rotate(0.3deg);
}

.welcome-note h2 {
  padding-bottom: 12px;
  color: var(--ink);
}

.welcome-note p {
  padding-bottom: 13px;
}

.podpis {
  color: var(--teal);
  font-size: 24px;
  font-style: italic;
  font-weight: 700;
}

#news {
  min-width: 0;
  margin: 4px -8px 0 8px;
  padding: 24px 22px 20px;
  color: var(--ink-soft);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow:
    0 24px 46px rgba(15, 29, 53, 0.19),
    0 6px 16px rgba(15, 29, 53, 0.11);
  transform: rotate(0.6deg);
  transform-origin: 60% 0;
}

#news > h3.fs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 18px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#news > h3.fs a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: var(--cyan-soft);
  border-radius: 8px;
}

#news > h3.fs a:hover {
  background: #d4f1ed;
}

#news > h3.fs img {
  width: 16px;
  height: 16px;
}

#news > h3:not(:first-child) {
  display: block;
  padding: 18px 0 8px;
  border: 0;
  color: var(--teal);
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}

#news > h3:not(:first-child) + p {
  padding: 0 0 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
}

#news > p {
  padding: 3px 0 0;
  text-align: right;
}

#news > p a {
  font-size: 12px;
  font-weight: 700;
}

#news > p a::after {
  content: "  →";
}

#pf {
  margin: 12px -4px 0;
  padding: 16px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(15, 29, 53, 0.14);
  transform: rotate(-0.35deg);
}

#pf h3 {
  padding-bottom: 9px;
  color: var(--ink);
  font-size: 13px;
}

#pf h3:not(:first-child) {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

#pf ul {
  padding-left: 20px;
}

#pf li {
  padding-bottom: 5px;
}

table.pf_table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

table.pf_table tr td {
  width: 33.333%;
  padding: 4px;
  text-align: left;
}

table.pf_table img {
  display: block;
  filter: grayscale(0.1);
  opacity: 0.88;
}

table.pf_table img.portfolio-logo {
  max-height: 58px;
  object-fit: contain;
}

#links_holder {
  margin-top: 13px;
  padding: 0 34px;
  transform: translateX(-8px) rotate(-0.25deg);
}

#links {
  padding: 18px 20px 12px;
  background: var(--sidebar);
  border: 1px solid #d6ebe5;
  border-radius: 16px;
  box-shadow:
    0 18px 34px rgba(15, 29, 53, 0.16),
    0 5px 14px rgba(15, 29, 53, 0.09);
}

#links h3 {
  padding-bottom: 10px;
  color: var(--teal);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
}

#links p {
  padding: 0;
}

#links p a {
  display: block;
  padding: 6px 10px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 111, 103, 0.1);
  border-radius: 8px;
  font-size: 12px;
}

#links p a:hover {
  color: var(--teal);
  background: #fff;
  border-color: rgba(15, 111, 103, 0.3);
}

footer {
  width: auto;
  height: auto;
  margin: 14px 34px 0;
  padding: 14px 34px 10px;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow:
    0 22px 40px rgba(15, 29, 53, 0.17),
    0 5px 14px rgba(15, 29, 53, 0.09);
  transform: translate(8px, 1.67rem) rotate(0.25deg);
}

footer .td,
footer .tr,
footer .td.pp1,
footer .td.pp2 {
  display: block;
  width: 100%;
}

footer .td.pp1 h3 {
  padding-bottom: 7px;
  color: var(--ink);
  font-size: 12px;
}

footer .tr.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 16px;
}

footer .tr.grid .td {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

footer .tr.grid .td strong {
  color: var(--ink-soft);
  font-size: 11px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

footer .tr.grid .td img.donation-qr {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 8px;
}

footer .tr.grid .td a {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 11px;
}

footer form {
  display: grid;
  justify-items: center;
}

footer form input[type="image"] {
  width: auto;
  height: auto;
}

.copy {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 7px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.copy a {
  font-weight: 700;
}

@media (max-width: 960px) {
  header,
  footer,
  #links_holder {
    padding-right: 24px;
    padding-left: 24px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  #contents {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 30px 24px 12px;
  }

  #contents.double-column main {
    padding-right: 0;
    border-right: 0;
  }

  #contents.double-column > main .hero,
  #contents.double-column > main .project-hero,
  #contents.double-column > main .welcome-note,
  #contents.double-column > #news,
  #pf,
  #links_holder,
  footer {
    transform: none;
  }

  .hero {
    margin-right: 0;
    margin-left: 0;
  }

  .project-hero {
    margin-right: 0;
    margin-left: 0;
  }

  .hero::before {
    background-size: 62% 100%;
    opacity: 0.2;
  }

  .welcome-note {
    margin-left: 0;
  }

  #news {
    margin-right: 0;
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 14px;
  }

  #wrapper {
    width: 100%;
    margin: 0;
    padding-top: 0;
  }

  #content {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  header {
    padding: 20px 18px;
  }

  .brand-copy small {
    max-width: 200px;
    font-size: 9px;
  }

  .site-nav {
    gap: 9px 14px;
  }

  .nav-link {
    font-size: 12px;
  }

  .cv-button span {
    display: none;
  }

  .cv-button {
    width: 36px;
    padding: 8px;
  }

  #contents {
    padding: 18px 18px 10px;
  }

  .hero {
    padding: 28px 24px;
    border-radius: 16px;
  }

  .project-hero {
    padding: 28px 24px;
    border-radius: 16px;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero::before {
    background-size: 82% 100%;
    opacity: 0.16;
  }

  .role-line {
    font-size: 11px;
  }

  .lead {
    font-size: 15px;
  }

  .hero-stats {
    gap: 10px;
  }

  .hero-stats span {
    font-size: 8px;
  }

  .project-lead {
    font-size: 16px;
  }

  .project-facts {
    gap: 10px;
  }

  .project-facts strong {
    font-size: 14px;
  }

  .project-facts span {
    font-size: 8px;
  }

  .links {
    grid-template-columns: 1fr;
  }

  #links_holder,
  footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  footer {
    margin-right: 18px;
    margin-left: 18px;
  }

  footer .tr.grid {
    grid-template-columns: 1fr;
  }

  .copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
