body {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 300;
  background: white;
  position: relative;
  margin: 3em 2em;
}

.background-noise {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background:
    linear-gradient(to bottom, #e8e4df 0px, #e8e4df 8em, transparent 16em, transparent),
    /* soft lavender: #e4dde8 */ /* muted teal: #d0e4e6 */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg' opacity='0.4'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  z-index: -1;
}

.container {
  margin: 0 auto;
  max-width: 1024px;
  padding: 1em 2em 14em 2em;
  position: relative;
  background: rgba(255, 255, 255, 1);
  border: 1px solid #d4cfc8;
  /* soft lavender: #d0c4d6 */
  /* muted teal: #b4c9cb */
}

.top-button-container {
  position: absolute;
  top: 1.5em;
  right: 2em;
  vertical-align: middle;
}

.container > .grid > div {
  padding-bottom: 6em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Verdana, Arial, sans-serif;
}

h1 {
  font-weight: bold;
  font-size: 3em;
  color: #20232a;
  margin-block-start: 0.5em;
  margin-block-end: 0.25em;
}

h2 {
  font-size: 1.4em;
  margin-top: 2em;
  margin-bottom: 1em;
}

h3 {
  margin-top: 1em;
  margin-bottom: 0.5em;
  font-size: 1em;
  color: #20232a;
}

hr {
  border-style: none;
  border-top: 1px dotted #cccccc;
  margin: 2em 8em;
}

a {
  color: #106c9a;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.25s ease-in-out;
}

strong a {
  font-weight: 700;
}

.contact-icon {
  width: 1.25em;
  height: 1.25em;
  margin-right: 0.25em;
  vertical-align: text-bottom;
}

.experience hr {
  margin: 1em auto;
  width: 25%;
}

a:hover {
  color: #20232a;
  text-decoration: underline;
}

p {
  margin-block-start: 0.5em;
  margin-block-end: 0.5em;
}

p,
ul,
ol {
  line-height: 1.5em;
}

ul,
ol {
  margin-block-start: 0.5em;
}

li {
  margin-block-end: 0.5em;
}

.face {
  margin: 4em auto 0 auto;
  width: 8em;
  height: 8em;
  border-radius: 32em;
  border: 1px solid #666;
  overflow: hidden;
}

.face img {
  width: 210%;
  height: 210%;
  margin-top: 0em;
  margin-left: -4.25em;
  filter: grayscale(1) contrast(2.5) brightness(1);
  mix-blend-mode: multiply;
}

.lead {
  font-family: Verdana, Arial, sans-serif;
  font-weight: 300;
  text-align: center;
  padding-bottom: 3em;
  border-bottom: 1px dotted #cccccc;
}

.lead-text {
  max-width: 1024px;
  margin: 0 auto;
}

.lead-image {
  width: calc(100% + 4em);
  margin: -1em -2em 2em -2em;
  display: block;
  height: 250px;
  overflow: hidden;
}

.lead:has(.lead-image) {
  padding-top: 0;
}

.lead-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.lead-image-credit {
  font-size: 0.75em;
  color: #ffffff;
  text-align: center;
  margin-top: -270px;
  margin-bottom: 270px;
  display: block;
  text-align: right;
  text-shadow: 0 0 2px #20232a;
}

.lead-image-credit a {
  color: #ffffff;
  text-decoration: none;
}

.intro {
  margin-top: 2.4em;
  font-weight: bold;
}

.menu {
  font-family: Verdana, Arial, sans-serif;
  text-align: center;
  border-bottom: 1px dotted #cccccc;
  padding: 1em 0;
}

.menu a {
  margin: 1em;
  color: #666;
}

.menu a:hover,
.menu a:active,
.menu a:focus {
  color: #20232a;
  text-decoration: underline;
}

.gray,
.gray a {
  color: #666;
}

.grid {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) minmax(160px, 1fr);
  grid-gap: 2em;
  padding: 0 2em;
}

.experience {
  position: relative;
  margin-bottom: 1.5em;
}

.experience h3 {
  margin: 0;
  margin-bottom: 0.5em;
  font-weight: normal;
  display: block;
}

.experience .date,
.experience .tags,
.tags {
  color: #666;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.9em;
}

.experience .tags a,
.tags a {
  color: #666;
}

.experience:hover .show-more,
.show-more:hover {
  color: #106c9a;
}

.mark-box-outer {
  margin-left: 0.85em;
  margin-bottom: 0.25em;
}

.mark-box {
  width: 0.5em;
  height: 1em;
  margin-bottom: -0.125em;
  margin-left: -0.75em;
  display: inline-block;
}

.right {
  border-left: 1px dotted #cccccc;
  padding-left: 2em;
}

li::marker {
  color: #666;
}

.show-more {
  border: transparent;
  background: transparent;
  color: #666;
  padding: 0.1em 0;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.25s ease-in-out;
  display: block;
  text-align: right;
  margin-top: 1em;
}

.show-more svg {
  width: 1em;
  height: 1em;
  margin-top: -0.15em;
  fill: #666;
  transition: fill 0.25s ease-in-out;
  vertical-align: middle;
}

.show-more:hover svg {
  fill: #106c9a;
}

.details {
  opacity: 1;
  transition: opacity 0.25s ease-in-out;
}

.transparent {
  opacity: 0;
  pointer-events: none;
}

.hidden {
  display: none;
}

article {
  margin-left: 0;
}

article header {
  margin-bottom: 2em;
}

article header .lead {
  text-align: left;
  padding-bottom: 1em;
  border-bottom: 1px dotted #cccccc;
}

article section {
  margin-bottom: 2em;
}

blockquote {
  border-left: 0.25em solid #cccccc;
  padding-left: 1em;
  margin-left: 0;
  font-style: italic;
}

article pre {
  background: #f5f5f5;
  border: 1px solid #dfdfdf;
  padding: 1em;
  overflow-x: auto;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
  body {
    margin: 0;
  }

  .container {
    margin: 0;
    padding: 1em;
    border: none;
  }

  .lead-image {
    width: calc(100% + 2em);
    margin: -1em -1em 2em -1em;
  }

  .lead-image-credit {
    font-size: 0.5em;
  }

  .top-button-container {
    top: 0.5em;
    right: 0.5em;
  }

  .grid {
    display: block;
    padding: 0;
  }

  .container > .grid > div {
    padding-bottom: 0;
  }

  .right {
    border-left: none;
    padding-left: 0;
    margin-top: 2em;
  }

  hr {
    margin: 1em 0;
  }

  h1 {
    font-size: 2em;
    margin: 0.5em 0;
  }

  h2 {
    font-size: 1.25em;
    padding-bottom: 0.25em;
    border-bottom: 1px dotted #cccccc;
  }
}

.print-only {
  display: none;
}

/* Print styles */
@media print {
  @page {
    size: A4;
    margin: 1.5cm;
    margin-bottom: 2cm;

    @bottom-left {
      content: "Full resume available at www.dzikowski.online/resume.html";
      font-size: 0.7em;
      color: #666;
      font-family: Verdana, Arial, sans-serif;
    }
  }

  body {
    font-size: 10pt;
    margin: 0;
    background: none;
  }

  h1 {
    margin-top: 0;
    font-size: 2em;
  }

  h2 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-size: 1.25em;
    color: #106c9a;
  }

  .container {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
  }

  .background-noise {
    display: none;
  }

  .lead-image {
    display: none;
  }

  .grid {
    display: grid;
    grid-template-columns: minmax(160px, 2fr) 220px;
    grid-gap: 3em;
    padding: 0;
  }

  .container > .grid > div {
    padding-bottom: 0;
  }

  .right {
    padding-left: 0;
    border-left: none;
  }

  .show-more {
    display: none;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  .lead {
    padding-bottom: 0;
    border-bottom: none;
    text-align: left;
    margin: 0;
  }

  .face {
    display: none;
  }

  .lead:after {
    content: "";
    display: block;
    clear: both;
  }

  .page-break-before {
    page-break-before: always;
    margin-top: 0em !important;
  }

  .print-only {
    display: block;
  }

  .www-only {
    display: none;
  }

  .print-dont-split {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* Reading/Writing page styles */
.reading-writing-content {
  padding: 2em 0;
  min-height: 60vh;
}

.text-editor {
  font-size: 2.5em;
  line-height: 1.6;
  color: #20232a;
  font-weight: 400;
  min-height: 400px;
  outline: none;
  padding: 1em;
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
  z-index: 1;
  caret-color: #20232a;
  /* Make cursor thicker - works in Chrome/Edge/Safari */
  /* stylelint-disable-next-line */
  caret-width: 0.2em;
}

.text-editor::selection {
  background-color: rgba(24, 134, 182, 0.2);
}

.text-editor:empty::before {
  content: "Wpisz tutaj...";
  color: #8f8f8f;
  font-style: italic;
}

.word-highlight {
  background-color: rgba(255, 235, 59, 0.3);
  animation: blink 0.5s ease-in-out infinite;
  border-radius: 0.1em;
  mix-blend-mode: multiply;
}

@keyframes blink {
  0%,
  100% {
    background-color: rgba(255, 235, 59, 0.4);
  }
  50% {
    background-color: rgba(255, 245, 157, 0.5);
  }
}

.word-highlight-overlay {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

@keyframes blink {
  0%,
  100% {
    background-color: #ffeb3b;
  }
  50% {
    background-color: #fff59d;
  }
}

@media screen and (max-width: 768px) {
  .text-editor {
    font-size: 1.8em;
    min-height: 300px;
  }
}
