:root {
  --bg: #121212;
  --bg-alt: #1e1e1e;
  --text: #d3d3d3;
  --heading: #a0c4ff;
  --accent: #0284c7;
  --tooltip-bg: rgba(50, 50, 50, 0.95);
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
}

.container {
  max-width: 960px;
  margin: 30px auto;
  background: var(--bg-alt);
  padding: 20px 40px;
  border-radius: 8px;
}

/* Header */
header {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

header h1 {
  margin: 0;
  color: var(--accent);
}

header h2 {
  margin: 5px 0;
  font-weight: normal;
  color: var(--heading);
}

/* Links */
a {
  color: var(--accent);
}
a:hover {
  text-decoration: underline;
}

/* Sections */
section {
  margin-top: 30px;
}

section h3 {
  border-bottom: 1px solid #333;
  color: var(--heading);
  padding-bottom: 5px;
  margin-bottom: 10px;
}

/* Summary */
section.summary {
  margin-top: 30px; /* tak samo jak inne sekcje */
}

section.summary h3 {
  border-bottom: 1px solid #333;
  color: var(--heading);
  padding-bottom: 5px;
  margin-bottom: 10px;
  font-weight: bold;
}

section.summary ul {
  list-style: none;
  padding-left: 20px; /* trochę odsunięcia listy */
  margin: 0;
}

section.summary ul li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 15px; /* miejsce na kropkę */
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}

section.summary ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* Experience */
.job {
  margin-bottom: 30px;
}

.job h4 {
  color: var(--accent);
  margin-bottom: 5px;
}

.meta {
  font-style: italic;
  font-size: 14px;
  color: #aaa;
  margin-bottom: 10px;
}

.job ul {
  margin-top: 10px;
  margin-bottom: 15px;
}
.job ul li {
  margin-bottom: 5px;
}

/* Skills with tooltip */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills .tooltip {
  background: #2b2b2b;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  flex: 0 1 auto;
  max-width: calc(33% - 10px);
  box-sizing: border-box;
  text-align: center;
  transition: background 0.3s;
}

.skills .tooltip:hover {
  background: #3a3a3a;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 280px;
  background-color: #ffffff;
  color: #2c3e50;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  text-align: left;
  border-radius: 6px;
  padding: 10px;
  position: absolute;
  z-index: 1;
  bottom: 130%;
  left: 50%;
  margin-left: -140px;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-line;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Education */
.education li {
  background: #1e1e1e;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}
.education strong {
  color: var(--heading);
  font-size: 15px;
}

/* Certifications */
.certifications li {
  background: #1e1e1e;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  border-left: 3px solid var(--accent);
  line-height: 1.5;
}
.certifications li strong {
  color: var(--heading);
}

/* Certifications (Grid view) */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 15px;
}

.cert-card {
  background: #1e1e1e;
  padding: 12px 16px;
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.cert-title {
  font-weight: bold;
  color: var(--heading);
  margin-bottom: 5px;
}
.cert-title span {
  color: #aaa;
  font-weight: normal;
  font-size: 13px;
  margin-left: 6px;
}

.cert-details {
  font-size: 14px;
  color: #ccc;
}

/* Language skills */
.language {
  margin-bottom: 20px;
}
.language > span {
  font-weight: bold;
  font-size: 16px;
  color: var(--heading);
  display: block;
  margin-bottom: 8px;
}

.level-row {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.level-block {
  flex: 1 1 45%;
  min-width: 120px;
}

.label {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 4px;
}

.bar {
  background: #2a2a2a;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.bar .fill {
  background: var(--accent);
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 0.5s ease-in-out;
}

/* Interests */
.interests li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2b2b2b;
  color: #ddd;
  padding: 6px 12px;
  border-radius: 20px;
  margin: 5px;
}

/* Footer */
footer {
  margin-top: 40px;
  font-size: 12px;
  color: #888;
  text-align: center;
  border-top: 1px solid #333;
  padding-top: 15px;
}

/* 🔧 Responsive: Tooltip adjustments */
@media (max-width: 768px) {
  .skills .tooltip {
    max-width: 100%;
    text-align: left;
    white-space: normal;
  }
   .summary-grid {
    grid-template-columns: 1fr;
  }
  .tooltip .tooltiptext {
    width: 90vw;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    bottom: auto;
    top: 120%;
  }
}

/* 🖨️ Print styles */
@media print {
  body {
    background: white;
    color: black;
  }

  .container {
    box-shadow: none;
    background: white;
    padding: 0;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 10px;
    color: gray;
  }

  .tooltip .tooltiptext {
    display: none !important;
  }

  .tooltip {
    background: transparent;
    color: black;
    cursor: default;
  }

  button {
    display: none !important;
  }
}
