/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* ---------------------- */

/* General */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.3em;
}

body {
  margin: 30px 15px 30px 15px;
  font-family: 'Inconsolata', monospace;
  background-color: #223033;
  color: #fff;
  min-width: 600px;
}

@media (max-width: 600px) {
  body {
    transform: scale(calc(100vw / 600));
    transform-origin: top left;
    width: 600px;
  }
}

section > p, article > p {
  font-size: 1.2em;
  line-height: 1.3em;
}

/* Container */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Header & Intro */
.header {
  display: flex;
  flex-direction: column; /* header + linki pod sobą */
  align-items: flex-start;
}

.header-top { 
  display: flex; 
  align-items: center; 
  gap: 15px;
  width: 100%;
}

.header-links { 
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
}

.avatar-container {
  flex-shrink: 1;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
}

.avatar-container img {
  display: block;
  width: clamp(50px, 10vw, 100px);
  height: auto;
  border-radius: 15px;
}

.intro-text {
  flex: 1;
  padding-top: 4px;
  margin-left: 15px;
}

.intro-text h1,
.intro-text p {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: bold;
  line-height: 1.2;
  white-space: nowrap;
}

/* Retro cursor */
.retro-cursor::after {
  content: '_';
  display: inline-block;
  width: 1ch;
  height: 1em;
  color: #fff;
  animation: blink 2s steps(1) infinite;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

/* Navigation Links */
.links {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0 30px 0;
}

.links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
  list-style: none;
}

.links li:not(:last-child)::after {
  content: "::";
  margin-left: 0.3em;
  color: #aaaaaa;
}

.links a {
  color: #668888;
}

.links a:hover,
.links a:focus {
  color: #ffffff;
  text-decoration: underline;
}


/* Links */
a {
  color: #CC66bb;
  text-decoration: none;
}

a:hover,
a:focus {
  filter: brightness(1.4);
  text-decoration: underline;
}

/* Video Wrappers */
.video-wrapper {
  background-color: #000;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 30px;
  width: 100%;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.video-16-9 {
  aspect-ratio: 16 / 9;
}

.video-16-6 {
  aspect-ratio: 16 / 6;
}

/* Code blocks */
pre {
  border-radius: 15px !important;
  overflow: hidden;
  background-color: #1d2224 !important;
  margin-bottom: 30px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}

pre code {
  display: block;
  padding: 20px;
  overflow-x: auto;
}

/* Prism command-line plugin */
.command-line-prompt > span:before {
  color: #55ccbb;
  font-weight: 700;
  border-right: none;
  margin-right: 0.6em;
}

.sys { color: #bbcc55; font-weight: 700; display: block; }
.user { color: #fff; display: block; }
.prompt { color: #55ccbb; font-weight: 700; }

/* Section images */
main img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 15px;
  margin: 0 auto; /* wyśrodkowanie obrazków */
}

/* Image link overlay effect */
.img-link {
  position: relative;
  display: inline-block;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 30px;
  filter: none !important;
}

.img-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.25s ease;
}

.img-link:hover::after,
.img-link:focus-visible::after {
  background: rgba(0,0,0,0.5);
  z-index: 1;
}

.img-link::before {
  content: "open in new tab";
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 1.8rem;
  font-weight: bold;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 2; 
  text-shadow: 2px 2px 6px rgba(0,0,0,1);
}

.img-link:hover::before,
.img-link:focus-visible::before {
  opacity: 1;
}

/* Section spacing */
section { margin-bottom: 30px; }
section + section { margin-top: 30px; }

article { margin-bottom: 30px; }
article + article { margin-top: 30px; }

/* Section headers with hash line */
section h2, article h2 {
  display: flex;
  align-items: center;
  font-family: 'Inconsolata';
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
}

section h2::before, article h2::before { content: "#\00a0"; flex-shrink: 0; }
section h2::after, article h2::after {
  content: "-------------------------------------------------------------------";
  flex-shrink: 1;
  margin-left: 0.5em;
}

section > p {
  line-height: 1.4em; /* przywrócone */
  font-size: 1.2em;
}

/* Quotes */
.quotes {
  list-style: none;
  padding: 0;
}

.quotes li {
  padding: 0;
  background-color: #1d2224;
  margin-bottom: 15px;
  padding: 15px 20px 15px 20px;
  border-radius: 15px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
  line-height: 1.3em;
}

.quotes blockquote {
  display: flex;
  align-items: baseline;
}

.quotes blockquote footer {
  order: -1;
  margin-right: 0.5em;
  font-weight: normal;
}

.quotes blockquote footer::after {
  content: ":";
}

.quotes blockquote footer cite {
  font-style: normal;
  color: #55ccbb;
}

.quotes blockquote p {
  font-style: italic;
  margin: 0;
  padding: 0;
}

.quotes strong {
  color:#bbcc55;
}

/* Footer */
body > footer {
  padding: 30px 30px;
  margin: 60px -30px -30px -30px;
  background-color: #1d2224;
  color: #888;
  font-size: 0.9em;
}

body > footer a {
  color: #AA4499;
  text-decoration: none;
}

footer a:hover,
footer a:focus {
  color: #CC66bb;
  text-decoration: underline;
}

footer .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

section > h2, article > h2 {
  font-size: 1.7em;
  margin-bottom: 1em;
}

section > h3, article > h3 {
  font-size: 1.4em;
  margin-bottom: 0.5em;
}

section > p, article > p {
  margin-bottom: 1em;
}

section > ul, article > ul {
  margin-bottom: 1.8em;
}

.terminal-links {
  list-style: none;
  font-size: 1.2em;
  line-height: 1.3em;
  background-color: #1d2224;
  padding: 1em;
  border-radius: 15px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}

.terminal-links li {
  display: inline;
}

.terminal-links li:nth-child(6n+1) a { color: #CC66BB; }
.terminal-links li:nth-child(6n+2) a { color: #CC7766; }
.terminal-links li:nth-child(6n+3) a { color: #BBCC66; }
.terminal-links li:nth-child(6n+4) a { color: #66CC77; }
.terminal-links li:nth-child(6n+5) a { color: #66BBCC; }
.terminal-links li:nth-child(6n+6) a { color: #7766CC; }

.terminal-links li::after {
  content: ", ";
}

.terminal-links li:last-child::after {
  content: "";
}